summaryrefslogtreecommitdiff
path: root/Biz
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-12-13 23:55:16 -0500
committerBen Sima <ben@bsima.me>2021-12-13 23:55:16 -0500
commitddd8ca76de7fb32f2253986e425f161c11472cf0 (patch)
treeeade83698a0892df6458fc12e01097f721ed07e0 /Biz
parent21ccc9f4ffe6d737b283b49eb6419eeca0aba763 (diff)
Bug: giv correct paths to runBuildAnalyze
Diffstat (limited to 'Biz')
-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";