4
4
zstdStaticBin=@zstdStaticBin@
5
5
prootStaticBin=@prootStaticBin@
6
6
bwrapStaticBin=@bwrapStaticBin@
7
+ nix=@nix@
7
8
nixStaticBin=@nixStaticBin@
8
9
busyboxStaticBin=@busyboxStaticBin@
9
10
busyboxBins=(@busyboxBins@)
@@ -357,7 +358,7 @@ debug "NP_RUNTIME: $NP_RUNTIME"
357
358
# ## setup runtime args
358
359
if [ " $NP_RUNTIME " == " nix" ]; then
359
360
run=" $NP_NIX shell -f $dir /mini-drv.nix -c"
360
- PATH=" $PATH :$store $( removePrefix " /nix/store" $nixStaticBin ) /bin"
361
+ PATH=" $PATH :$store $( removePrefix " /nix/store" $nix ) /bin"
361
362
export PATH
362
363
NP_CONF_STORE=" $dir "
363
364
recreate_nix_conf
@@ -426,7 +427,7 @@ index="$(cat $storeTar/closureInfo/store-paths)"
426
427
if [ -n " $missing " ]; then
427
428
debug " registering new store paths to DB"
428
429
# reg="$(cat $storeTar/closureInfo/registration)"
429
- cmd=" $run $store $( removePrefix " /nix/store" $nixStaticBin ) /bin/nix-store --load-db"
430
+ cmd=" $run $store $( removePrefix " /nix/store" $nix ) /bin/nix-store --load-db"
430
431
debug " running command: $cmd "
431
432
# echo "$reg" | $cmd
432
433
fi
@@ -451,11 +452,11 @@ elif [[ "$(basename "$0")" == nix-portable* ]]; then\
451
452
bin=" $( which " $2 " ) "
452
453
shift ; shift
453
454
else
454
- bin=" $store $( removePrefix " /nix/store" $nixStaticBin ) /bin/$1 "
455
+ bin=" $store $( removePrefix " /nix/store" $nix ) /bin/$1 "
455
456
shift
456
457
fi
457
458
else
458
- bin=" $store $( removePrefix " /nix/store" $nixStaticBin ) /bin/$( basename " $0 " ) "
459
+ bin=" $store $( removePrefix " /nix/store" $nix ) /bin/$( basename " $0 " ) "
459
460
fi
460
461
461
462
472
473
# ## check if nix is functional with or without sandbox
473
474
# sandbox-fallback is not reliable: https://github.com/NixOS/nix/issues/4719
474
475
if [ " $newNPVersion " == " true" ] || [ " $lastRuntime " != " $NP_RUNTIME " ]; then
475
- nixBin=" $store $( removePrefix " /nix/store" $nixStaticBin ) /bin/nix"
476
+ nixBin=" $store $( removePrefix " /nix/store" $nix ) /bin/nix"
476
477
# if [ "$NP_RUNTIME" == "nix" ]; then
477
478
# nixBin="nix"
478
479
# else
@@ -518,7 +519,7 @@ export PATH="$dir/tmpbin:$PATH"
518
519
# ## install git via nix, if git installation is not in /nix path
519
520
if $doInstallGit && [ ! -e " $store $( removePrefix " /nix/store" $git ) " ] ; then
520
521
echo " Installing git. Disable this by specifying the git executable path with 'NP_GIT'"
521
- $run " $store $( removePrefix " /nix/store" $nixStaticBin ) /bin/nix" build --impure --no-link --expr "
522
+ $run " $store $( removePrefix " /nix/store" $nix ) /bin/nix" build --impure --no-link --expr "
522
523
(import $nixpkgsSrc {}).$gitAttribute .out
523
524
"
524
525
else
0 commit comments