1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Let build.cc verify the expected hash of a substituter's output

Since SubstitutionGoal::finished() in build.cc computes the hash
anyway, we can prevent the inefficiency of computing the hash twice by
letting the substituter tell Nix about the expected hash, which can
then verify it.
This commit is contained in:
Eelco Dolstra 2012-07-27 12:16:02 -04:00
parent fbf59d95f6
commit 73acb8b836
5 changed files with 43 additions and 26 deletions

View file

@ -29,6 +29,7 @@ if test $1 = "--query"; then
elif test $1 = "--substitute"; then
mkdir $2
echo "Hallo Wereld" > $2/hello
echo # no expected hash
else
echo "unknown substituter operation"
exit 1