mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +02:00
parent
0099f8e8de
commit
0776aa11c9
3 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,7 @@ echo $path2
|
||||||
if test "$path1" != "$path2"; then
|
if test "$path1" != "$path2"; then
|
||||||
echo "nix-store --add and --add-fixed mismatch"
|
echo "nix-store --add and --add-fixed mismatch"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
path3=$(nix-store --add-fixed sha256 ./dummy)
|
path3=$(nix-store --add-fixed sha256 ./dummy)
|
||||||
echo $path3
|
echo $path3
|
||||||
|
|
|
@ -11,7 +11,7 @@ with import ./config.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
hashmismatch = import <nix/fetchurl.nix> {
|
hashmismatch = import <nix/fetchurl.nix> {
|
||||||
url = "file://" + toString ./dummy;
|
url = "file://" + builtins.getEnv "TMPDIR" + "/dummy";
|
||||||
sha256 = "0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73";
|
sha256 = "0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,9 @@ nix-build check.nix -A fetchurl --no-out-link --repair --hashed-mirrors ''
|
||||||
nix-build check.nix -A hashmismatch --no-out-link --hashed-mirrors '' || status=$?
|
nix-build check.nix -A hashmismatch --no-out-link --hashed-mirrors '' || status=$?
|
||||||
[ "$status" = "102" ]
|
[ "$status" = "102" ]
|
||||||
|
|
||||||
echo -n > ./dummy
|
echo -n > $TMPDIR/dummy
|
||||||
nix-build check.nix -A hashmismatch --no-out-link --hashed-mirrors ''
|
nix-build check.nix -A hashmismatch --no-out-link --hashed-mirrors ''
|
||||||
echo 'Hello World' > ./dummy
|
echo 'Hello World' > $TMPDIR/dummy
|
||||||
|
|
||||||
nix-build check.nix -A hashmismatch --no-out-link --check --hashed-mirrors '' || status=$?
|
nix-build check.nix -A hashmismatch --no-out-link --check --hashed-mirrors '' || status=$?
|
||||||
[ "$status" = "102" ]
|
[ "$status" = "102" ]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue