Rewrite builtin derivation environment
Also add a test. Fixes #1803. Closes #1805.
This commit is contained in:
parent
2896bb6826
commit
3c4c30eadd
3 changed files with 25 additions and 1 deletions
|
@ -16,3 +16,17 @@ nix-build dependencies.nix --no-out-link --repeat 3
|
|||
(! nix-build check.nix -A nondeterministic --no-out-link --repeat 1 2> $TEST_ROOT/log)
|
||||
grep 'differs from previous round' $TEST_ROOT/log
|
||||
|
||||
path=$(nix-build check.nix -A fetchurl --no-out-link)
|
||||
|
||||
chmod +w $path
|
||||
echo foo > $path
|
||||
chmod -w $path
|
||||
|
||||
nix-build check.nix -A fetchurl --no-out-link --check
|
||||
|
||||
# Note: "check" doesn't repair anything, it just compares to the hash stored in the database.
|
||||
[[ $(cat $path) = foo ]]
|
||||
|
||||
nix-build check.nix -A fetchurl --no-out-link --repair
|
||||
|
||||
[[ $(cat $path) != foo ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue