diff options
Diffstat (limited to 'Biz/Bild.hs')
-rw-r--r-- | Biz/Bild.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Biz/Bild.hs b/Biz/Bild.hs index 5c28964..a538f98 100644 --- a/Biz/Bild.hs +++ b/Biz/Bild.hs @@ -245,6 +245,8 @@ data Target = Target namespace :: Namespace, -- | Absolute path to file path :: FilePath, + -- | Name of the packageset in Bild.nix to pull langdeps from + packageSet :: Text, -- | Language-specific dependencies, required during compilation langdeps :: Set Meta.Dep, -- | Local source files on which this target depends @@ -424,6 +426,7 @@ analyze hmap ns = case Map.lookup ns hmap of compiler = Gcc, builder = Local user, out = pout, + packageSet = "", -- none, or maybe I should make cPackages? compilerFlags = concat [ [o, dir, str absPath] @@ -450,6 +453,7 @@ analyze hmap ns = case Map.lookup ns hmap of { builder = Local user, wrapper = Nothing, compiler = Ghc, + packageSet = "ghcWith", compilerFlags = [ "-Werror", "-i$src", @@ -484,6 +488,7 @@ analyze hmap ns = case Map.lookup ns hmap of { sysdeps = Set.empty, wrapper = Nothing, compiler = Sbcl, + packageSet = "sbclWith", compilerFlags = map Text.pack @@ -517,6 +522,7 @@ analyze hmap ns = case Map.lookup ns hmap of out = Meta.None, outPath = outToPath Meta.None, srcs = Set.singleton absPath, + packageSet = "", .. } |> Just @@ -527,6 +533,7 @@ analyze hmap ns = case Map.lookup ns hmap of { langdeps = pdep, sysdeps = psys, compiler = Guile, + packageSet = "guilePackages", compilerFlags = [ "compile", "--r7rs", @@ -562,6 +569,7 @@ analyze hmap ns = case Map.lookup ns hmap of Meta.detectOut (Meta.out "//") contentLines |> \out -> Target { langdeps = Set.empty, + packageSet = "rustPackages", wrapper = Nothing, sysdeps = Set.empty, compiler = Rustc, @@ -835,7 +843,7 @@ nixBuild loud Target {..} = args = [ argstr "srcs" <| unwords <| map str <| (root </> path) : Set.toList srcs, argstr "root" <| str root, - argstr "packageSet" "ghcWith", + argstr "packageSet" packageSet, (argstr "langDeps" <| unwords <| map str <| Set.toList langdeps) <|> mempty, argstr "name" <| str <| outname out, argstr "main" <| str path, |