diff --git a/pkgs/misc/my-env/default.nix b/pkgs/misc/my-env/default.nix index 4b0336b30da9..7d37576e4cdb 100644 --- a/pkgs/misc/my-env/default.nix +++ b/pkgs/misc/my-env/default.nix @@ -72,20 +72,21 @@ mkDerivation { phases = [ "buildPhase" "fixupPhase" ]; setupNew = substituteAll { src = ../../stdenv/generic/setup.sh; - initialPath= (import ../../stdenv/common-path.nix) { inherit pkgs; }; inherit gcc; }; - buildPhase = '' + buildPhase = let + initialPath = import ../../stdenv/common-path.nix { inherit pkgs; }; + in '' set -x mkdir -p "$out/dev-envs" "$out/nix-support" "$out/bin" s="$out/nix-support/setup-new-modified" - cp "$setupNew" "$s" # shut some warning up.., do not use set -e sed -e 's@set -e@@' \ -e 's@assertEnvExists\s\+NIX_STORE@:@' \ -e 's@trap.*@@' \ - -i "$s" + -e '1i initialPath="${toString initialPath}"' \ + "$setupNew" > "$s" cat >> "$out/dev-envs/''${name/env-/}" << EOF nativeBuildInputs="$nativeBuildInputs" propagatedBuildInputs="$propagatedBuildInputs2"