summaryrefslogtreecommitdiff
path: root/Biz/Bild.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Bild.hs')
-rw-r--r--Biz/Bild.hs5
1 files changed, 5 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"], []),