summaryrefslogtreecommitdiff
path: root/Biz/Bild
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2023-08-17 17:28:03 -0400
committerBen Sima <ben@bsima.me>2023-08-17 22:43:38 -0400
commitcc6aac612e36da3c9b9b4e47fc16ed512a79f2d9 (patch)
treee32cfb60890c4293465c34d31c5771882b7fcb02 /Biz/Bild
parent204ccb2bcab7b6fa8fb4d8a26e65c591ae075343 (diff)
Nixify rust build
Not getting deps yet but thats okay, I basically need to do a bunch of annoying nix work to get rustPackages into a thing like pythonPackages.
Diffstat (limited to 'Biz/Bild')
-rw-r--r--Biz/Bild/Builder.nix20
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 = ''