From ddd8ca76de7fb32f2253986e425f161c11472cf0 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 13 Dec 2021 23:55:16 -0500 Subject: Bug: giv correct paths to runBuildAnalyze --- Biz/Bild.nix | 10 +++++++--- 1 file 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"; -- cgit v1.2.3