mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +02:00
nix-push: Support generating a manifest again
This makes all the tests succeed. Woohoo!
This commit is contained in:
parent
50395b71a9
commit
67c6f3eded
6 changed files with 46 additions and 17 deletions
|
@ -7,14 +7,17 @@ mkdir -p $TEST_ROOT/cache2 $TEST_ROOT/patches
|
|||
RESULT=$TEST_ROOT/result
|
||||
|
||||
# Build version 1 and 2 of the "foo" package.
|
||||
nix-push --copy $TEST_ROOT/cache2 $TEST_ROOT/manifest1 \
|
||||
nix-push --dest $TEST_ROOT/cache2 --manifest --bzip2 \
|
||||
$(nix-build -o $RESULT binary-patching.nix --arg version 1)
|
||||
mv $TEST_ROOT/cache2/MANIFEST $TEST_ROOT/manifest1
|
||||
|
||||
out2=$(nix-build -o $RESULT binary-patching.nix --arg version 2)
|
||||
nix-push --copy $TEST_ROOT/cache2 $TEST_ROOT/manifest2 $out2
|
||||
nix-push --dest $TEST_ROOT/cache2 --manifest --bzip2 $out2
|
||||
mv $TEST_ROOT/cache2/MANIFEST $TEST_ROOT/manifest2
|
||||
|
||||
out3=$(nix-build -o $RESULT binary-patching.nix --arg version 3)
|
||||
nix-push --copy $TEST_ROOT/cache2 $TEST_ROOT/manifest3 $out3
|
||||
nix-push --dest $TEST_ROOT/cache2 --manifest --bzip2 $out3
|
||||
mv $TEST_ROOT/cache2/MANIFEST $TEST_ROOT/manifest3
|
||||
|
||||
rm $RESULT
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ clearStore
|
|||
clearProfiles
|
||||
|
||||
cat > $TEST_ROOT/foo.nixpkg <<EOF
|
||||
NIXPKG1 file://$TEST_ROOT/manifest simple $system $drvPath $outPath
|
||||
NIXPKG1 file://$TEST_ROOT/cache/MANIFEST simple $system $drvPath $outPath
|
||||
EOF
|
||||
|
||||
nix-install-package --non-interactive -p $profiles/test $TEST_ROOT/foo.nixpkg
|
||||
|
|
|
@ -19,7 +19,7 @@ nix-channel --remove xyzzy
|
|||
# Create a channel.
|
||||
rm -rf $TEST_ROOT/foo
|
||||
mkdir -p $TEST_ROOT/foo
|
||||
nix-push --copy $TEST_ROOT/foo $TEST_ROOT/foo/MANIFEST $(nix-store -r $(nix-instantiate dependencies.nix))
|
||||
nix-push --dest $TEST_ROOT/foo --manifest --bzip2 $(nix-store -r $(nix-instantiate dependencies.nix))
|
||||
rm -rf $TEST_ROOT/nixexprs
|
||||
mkdir -p $TEST_ROOT/nixexprs
|
||||
cp config.nix dependencies.nix dependencies.builder*.sh $TEST_ROOT/nixexprs/
|
||||
|
|
|
@ -2,7 +2,7 @@ source common.sh
|
|||
|
||||
pullCache () {
|
||||
echo "pulling cache..."
|
||||
nix-pull file://$TEST_ROOT/manifest
|
||||
nix-pull file://$TEST_ROOT/cache/MANIFEST
|
||||
}
|
||||
|
||||
clearStore
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
source common.sh
|
||||
|
||||
clearStore
|
||||
|
||||
drvPath=$(nix-instantiate dependencies.nix)
|
||||
outPath=$(nix-store -r $drvPath)
|
||||
|
||||
|
@ -7,4 +9,4 @@ echo "pushing $drvPath"
|
|||
|
||||
mkdir -p $TEST_ROOT/cache
|
||||
|
||||
nix-push --copy $TEST_ROOT/cache $TEST_ROOT/manifest $drvPath
|
||||
nix-push --dest $TEST_ROOT/cache --manifest $drvPath --bzip2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue