summaryrefslogtreecommitdiff
path: root/Biz/Bild
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Bild')
-rw-r--r--Biz/Bild/Builder.nix25
1 files changed, 12 insertions, 13 deletions
diff --git a/Biz/Bild/Builder.nix b/Biz/Bild/Builder.nix
index d1fc48b..1a2460a 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, bild ? import ../Bild.nix { } }:
+{ analysisJSON, bild }:
+with bild;
let
- lib = bild.lib;
analysis = builtins.fromJSON analysisJSON;
build = _: target:
let
@@ -53,29 +53,28 @@ let
sysdeps_ = if isEmpty target.sysdeps then
[ ]
else
- lib.attrsets.attrVals target.sysdeps bild.pkgs;
+ lib.attrsets.attrVals target.sysdeps pkgs;
rundeps_ = if isEmpty target.rundeps then
[ ]
else
- lib.attrsets.attrVals target.rundeps bild.pkgs;
+ lib.attrsets.attrVals target.rundeps pkgs;
CODEROOT = ".";
builders = {
- base = bild.stdenv.mkDerivation rec {
+ base = stdenv.mkDerivation rec {
inherit name src CODEROOT preBuild;
buildInputs = langdeps_ ++ sysdeps_;
installPhase = "install -D ${name} $out/bin/${name}";
buildPhase = compileLine;
};
- haskell = bild.stdenv.mkDerivation rec {
+ haskell = stdenv.mkDerivation rec {
inherit name src CODEROOT preBuild;
- nativeBuildInputs = [ bild.makeWrapper ];
+ nativeBuildInputs = [ makeWrapper ];
buildInputs = sysdeps_ ++ [
- (bild.haskell.ghcWith
- (p: (lib.attrsets.attrVals target.langdeps p)))
+ (haskell.ghcWith (p: (lib.attrsets.attrVals target.langdeps p)))
];
buildPhase = compileLine;
installPhase = ''
@@ -85,7 +84,7 @@ let
'';
};
- c = bild.stdenv.mkDerivation rec {
+ c = stdenv.mkDerivation rec {
inherit name src CODEROOT preBuild;
buildInputs = langdeps_ ++ sysdeps_;
installPhase = "install -D ${name} $out/bin/${name}";
@@ -106,11 +105,11 @@ let
];
};
- python = bild.python.buildPythonApplication rec {
+ python = python.buildPythonApplication rec {
inherit name src CODEROOT;
propagatedBuildInputs = langdeps_ ++ sysdeps_;
buildInputs = sysdeps_;
- nativeCheckInputs = lib.attrsets.attrVals [ "mypy" "ruff" ] bild.pkgs;
+ nativeCheckInputs = lib.attrsets.attrVals [ "mypy" "ruff" ] pkgs;
checkPhase = ''
check() {
$@ || { echo "fail: $name: $3"; exit 1; }
@@ -155,4 +154,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 (bild.lib.attrsets.mapAttrsToList build analysis)
+in builtins.head (lib.attrsets.mapAttrsToList build analysis)