summaryrefslogtreecommitdiff
path: root/Biz/Bild.nix
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Bild.nix')
-rw-r--r--Biz/Bild.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix
index a4e655b..8d57d54 100644
--- a/Biz/Bild.nix
+++ b/Biz/Bild.nix
@@ -48,17 +48,21 @@ in rec {
};
# wrapper around bild
- runBildAnalyze = main: stdenv.mkDerivation {
+ runBildAnalyze = main: stdenv.mkDerivation rec {
name = "bild-analysis";
src = ../.;
USER = "nixbld";
HOSTNAME = "nix-sandbox";
- BIZ_ROOT = "$src";
+ # this is the default sandbox path where bild will be working:
+ BIZ_ROOT = "/build/biz";
+ # we need to remove the $src root because bild expects paths relative to the
+ # working directory:
+ MAIN = "." + lib.strings.removePrefix (toString src) (toString main);
buildPhase = ''
set -eux
mkdir $out
: analyzing with bild
- ${bild}/bin/bild --json ${main} 1> $out/analysis.json 2> $out/stderr
+ ${bild}/bin/bild --json "$MAIN" 1> $out/analysis.json 2> $out/stderr
set +eux
'';
installPhase = "exit 0";