diff options
author | Ben Sima <ben@bsima.me> | 2023-07-28 21:05:57 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2023-07-28 21:05:57 -0400 |
commit | cd0b32e234fcf17bbc7195918cdcd289b90c39e5 (patch) | |
tree | 17f23b84617801e2bbe4f222cb3f61c7519ff23b | |
parent | a6c7ac84259269183ff3b5922232da7b2da552e6 (diff) |
Add NIX_CFLAGS_COMPILE and some deps
-rw-r--r-- | Biz/Bild.hs | 5 | ||||
-rw-r--r-- | Biz/Bild.nix | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Biz/Bild.hs b/Biz/Bild.hs index 4f8b1e4..34e30e9 100644 --- a/Biz/Bild.hs +++ b/Biz/Bild.hs @@ -379,6 +379,10 @@ analyze hmap ns = case Map.lookup ns hmap of Namespace.Sh -> pure Nothing Namespace.C -> Meta.detectAll "//" contentLines |> \Meta.Parsed {..} -> do + nixCFlags <- + Env.getEnv "NIX_CFLAGS_COMPILE" + /> Text.pack + /> Text.words langdepFlags <- null pdep ?. ( runw "pkg-config" ("--cflags" : Set.toList pdep), @@ -401,6 +405,7 @@ analyze hmap ns = case Map.lookup ns hmap of [ [o, dir, str absPath] ++ langdepFlags ++ sysdepFlags + ++ nixCFlags ++ (map Text.pack <| Set.toList parg) | let outable = pout /= Meta.None, o <- outable ?: (["-o"], []), diff --git a/Biz/Bild.nix b/Biz/Bild.nix index 69fe5e1..a51a3d0 100644 --- a/Biz/Bild.nix +++ b/Biz/Bild.nix @@ -50,6 +50,9 @@ rec { private.ghcPackageSetBild rustc gcc + gdb + valgrind + argp-standalone (private.sbclWith (p: with p; [asdf alexandria])) # just enough to build Example.lisp ]; |