diff options
Diffstat (limited to 'Biz/Bild/Builder.nix')
-rw-r--r-- | Biz/Bild/Builder.nix | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Biz/Bild/Builder.nix b/Biz/Bild/Builder.nix index 2b1403a..7ce29a2 100644 --- a/Biz/Bild/Builder.nix +++ b/Biz/Bild/Builder.nix @@ -34,11 +34,11 @@ let src = lib.sources.cleanSourceWith {inherit filter; src = lib.sources.cleanSource root;}; - langdeps_ = pkgset: + langdeps_ = if langdeps == null || langdeps == [] then [] else - private.selectAttrs (lib.strings.splitString " " langdeps) pkgset; + private.selectAttrs (lib.strings.splitString " " langdeps) private.${packageSet}; sysdeps_ = if sysdeps == null || sysdeps == [] then [] @@ -48,14 +48,26 @@ let in { base = stdenv.mkDerivation rec { inherit name src BIZ_ROOT postUnpack; - buildInputs = [ (private.${packageSet} langdeps_) ] ++ sysdeps_; + buildInputs = langdeps_ ++ sysdeps_; + installPhase = "install -D ${name} $out/bin/${name}"; + buildPhase = compileLine; + }; + + + haskell = stdenv.mkDerivation rec { + inherit name src BIZ_ROOT postUnpack; + buildInputs = sysdeps_ ++ [ + (private.ghcWith (p: + (private.selectAttrs (lib.strings.splitString " " langdeps) p) + )) + ]; installPhase = "install -D ${name} $out/bin/${name}"; buildPhase = compileLine; }; python = buildPythonApplication rec { inherit name src BIZ_ROOT postUnpack; - propagatedBuildInputs = [ (private.${packageSet} langdeps_) ] ++ sysdeps_; + propagatedBuildInputs = [ (private.pythonWith (_: langdeps_)) ] ++ sysdeps_; buildInputs = sysdeps_; checkInputs = [(private.pythonWith (p: with p; [black mypy pylint]))]; checkPhase = '' |