summaryrefslogtreecommitdiff
path: root/Biz/Bild/Builder.nix
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Bild/Builder.nix')
-rw-r--r--Biz/Bild/Builder.nix16
1 files changed, 8 insertions, 8 deletions
diff --git a/Biz/Bild/Builder.nix b/Biz/Bild/Builder.nix
index 4bef830..d1fc48b 100644
--- a/Biz/Bild/Builder.nix
+++ b/Biz/Bild/Builder.nix
@@ -3,9 +3,9 @@
wouldn't you?
- Try to reuse as much upstream Nix as possible.
*/
-{ analysisJSON, nixpkgs ? import ../Bild.nix { } }:
-with nixpkgs;
+{ analysisJSON, bild ? import ../Bild.nix { } }:
let
+ lib = bild.lib;
analysis = builtins.fromJSON analysisJSON;
build = _: target:
let
@@ -53,7 +53,7 @@ let
sysdeps_ = if isEmpty target.sysdeps then
[ ]
else
- lib.attrsets.attrVals target.sysdeps pkgs;
+ lib.attrsets.attrVals target.sysdeps bild.pkgs;
rundeps_ = if isEmpty target.rundeps then
[ ]
@@ -63,16 +63,16 @@ let
CODEROOT = ".";
builders = {
- base = stdenv.mkDerivation rec {
+ base = bild.stdenv.mkDerivation rec {
inherit name src CODEROOT preBuild;
buildInputs = langdeps_ ++ sysdeps_;
installPhase = "install -D ${name} $out/bin/${name}";
buildPhase = compileLine;
};
- haskell = stdenv.mkDerivation rec {
+ haskell = bild.stdenv.mkDerivation rec {
inherit name src CODEROOT preBuild;
- nativeBuildInputs = [ makeWrapper ];
+ nativeBuildInputs = [ bild.makeWrapper ];
buildInputs = sysdeps_ ++ [
(bild.haskell.ghcWith
(p: (lib.attrsets.attrVals target.langdeps p)))
@@ -85,7 +85,7 @@ let
'';
};
- c = stdenv.mkDerivation rec {
+ c = bild.stdenv.mkDerivation rec {
inherit name src CODEROOT preBuild;
buildInputs = langdeps_ ++ sysdeps_;
installPhase = "install -D ${name} $out/bin/${name}";
@@ -155,4 +155,4 @@ let
# return a single drv, so just take the first one for now. ideally i would only
# pass Target, one at a time, (perhaps parallelized in haskell land) and then i
# wouldn't need all of this let nesting
-in builtins.head (lib.attrsets.mapAttrsToList build analysis)
+in builtins.head (bild.lib.attrsets.mapAttrsToList build analysis)