lix/scripts
Eelco Dolstra 1aa19b24b2 Add a flag ‘--check’ to verify build determinism
The flag ‘--check’ to ‘nix-store -r’ or ‘nix-build’ will cause Nix to
redo the build of a derivation whose output paths are already valid.
If the new output differs from the original output, an error is
printed.  This makes it easier to test if a build is deterministic.
(Obviously this cannot catch all sources of non-determinism, but it
catches the most common one, namely the current time.)

For example:

  $ nix-build '<nixpkgs>' -A patchelf
  ...
  $ nix-build '<nixpkgs>' -A patchelf --check
  error: derivation `/nix/store/1ipvxsdnbhl1rw6siz6x92s7sc8nwkkb-patchelf-0.6' may not be deterministic: hash mismatch in output `/nix/store/4pc1dmw5xkwmc6q3gdc9i5nbjl4dkjpp-patchelf-0.6.drv'

The --check build fails if not all outputs are valid.  Thus the first
call to nix-build is necessary to ensure that all outputs are valid.

The current outputs are left untouched: the new outputs are either put
in a chroot or diverted to a different location in the store using
hash rewriting.
2014-02-18 01:01:14 +01:00
..
build-remote.pl.in build-remote.pl: Don't use substituters on the remote 2013-09-18 14:04:03 +02:00
copy-from-other-stores.pl.in copy-from-other-stores.pl: Respect $NIX_BIN_DIR 2013-07-01 13:30:28 +02:00
copying-collector.pl * I said it couldn't be done. I was wrong. 2005-04-04 15:18:19 +00:00
download-from-binary-cache.pl.in Support cryptographically signed binary caches 2014-01-08 15:42:53 +01:00
download-using-manifests.pl.in Install bsdiff and bspatch in $(libexecdir)/nix 2013-12-02 20:21:31 +00:00
find-runtime-roots.pl.in Revert "Scan /proc/<pid>/cmdline for GC roots" 2013-12-20 14:18:24 +01:00
install-nix-from-closure.sh Force use of Bash 2014-02-10 17:42:36 +01:00
local.mk Fix "make dist" 2014-02-01 14:38:12 +01:00
nix-build.in Add a flag ‘--check’ to verify build determinism 2014-02-18 01:01:14 +01:00
nix-channel.in Support xz compression of nixexprs.tar in channels 2012-12-05 11:02:44 +01:00
nix-collect-garbage.in When ‘--help’ is given, just run ‘man’ to show the manual page 2012-10-03 16:40:09 -04:00
nix-copy-closure.in nix-copy-closure: Show a proper error message if no host name is given 2013-05-03 11:12:11 +02:00
nix-generate-patches.in nix-generate-patches: Optionally write new patches to $NIX_ALL_PATCHES 2012-04-04 20:46:18 +00:00
nix-http-export.cgi.in Replace wrong (w.r.t. PATH) sed call with in-shell substitution 2009-02-19 20:46:45 +00:00
nix-install-package.in When ‘--help’ is given, just run ‘man’ to show the manual page 2012-10-03 16:40:09 -04:00
nix-prefetch-url.in nix-prefetch-url: Improve option handling 2012-10-23 18:04:11 +02:00
nix-profile.sh.in nix-profile.sh: Add the Nixpkgs channel to $NIX_PATH 2014-01-15 14:34:49 +01:00
nix-pull.in When ‘--help’ is given, just run ‘man’ to show the manual page 2012-10-03 16:40:09 -04:00
nix-push.in Support cryptographically signed binary caches 2014-01-08 15:42:53 +01:00
nix-reduce-build.in Add support for ‘make installcheck’ 2013-11-25 18:47:03 +01:00
remove-patches.pl * Remove the localPaths feature in manifests since it's no longer used 2011-04-06 09:16:22 +00:00
show-duplication.pl * `show-duplication.pl', a small utility that shows the amount of 2006-09-19 13:53:35 +00:00