mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
Allow shorter syntax for chroot stores
You can now say '--store /tmp/nix' instead of '--store local?root=/tmp/nix'.
This commit is contained in:
parent
3460e4cf00
commit
d16fd24973
5 changed files with 23 additions and 11 deletions
|
@ -11,7 +11,7 @@ rm -rf $TEST_ROOT/store0 $TEST_ROOT/store1
|
|||
|
||||
nix build -f build-hook.nix -o $TEST_ROOT/result --max-jobs 0 \
|
||||
--sandbox-paths /nix/store --sandbox-build-dir /build-tmp \
|
||||
--builders "local?root=$TEST_ROOT/store0; local?root=$TEST_ROOT/store1 - - 1 1 foo"
|
||||
--builders "$TEST_ROOT/store0; $TEST_ROOT/store1 - - 1 1 foo"
|
||||
|
||||
outPath=$TEST_ROOT/result
|
||||
|
||||
|
@ -19,5 +19,5 @@ cat $outPath/foobar | grep FOOBAR
|
|||
|
||||
# Ensure that input1 was built on store1 due to the required feature.
|
||||
p=$(readlink -f $outPath/input-2)
|
||||
(! nix path-info --store local?root=$TEST_ROOT/store0 --all | grep dependencies.builder1.sh)
|
||||
nix path-info --store local?root=$TEST_ROOT/store1 --all | grep dependencies.builder1.sh
|
||||
(! nix path-info --store $TEST_ROOT/store0 --all | grep dependencies.builder1.sh)
|
||||
nix path-info --store $TEST_ROOT/store1 --all | grep dependencies.builder1.sh
|
||||
|
|
|
@ -14,7 +14,7 @@ chmod -R u+w $TEST_ROOT/store0 || true
|
|||
rm -rf $TEST_ROOT/store0
|
||||
|
||||
export NIX_STORE_DIR=/my/store
|
||||
export NIX_REMOTE="local?root=$TEST_ROOT/store0"
|
||||
export NIX_REMOTE=$TEST_ROOT/store0
|
||||
|
||||
outPath=$(nix-build dependencies.nix --no-out-link --option sandbox-paths /nix/store)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue