1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 23:28:26 -04:00
nix/src/libstore
Daiderd Jordan 97baf32fbc
build: add exit code for hash and check mismatches
Makes it easier to identify the failure reason in other tooling, eg.
differentiate between a non-deterministic --check vs a failed build.

	$ nix-build '<nix/fetchurl.nix>' --argstr url http://example.org --argstr sha256 0000000000000000000000000000000000000000000000000000
	hash mismatch in fixed-output derivation '/nix/store/nzi9ck45rwlxzcwr25is7qlf3hs5xl83-example.org':
	  wanted: sha256:0000000000000000000000000000000000000000000000000000
	  got:    sha256:08y4734bm2zahw75b16bcmcg587vvyvh0n11gwiyir70divwp1rm
	$ echo $?
	102

	$ nix-build -E 'with import <nixpkgs> {}; runCommand "foo" {} "date +%s > $out"' --check
	warning: rewriting hashes in '/nix/store/g3k47g0399fvjmbm0p0mnad74k4w8vkz-foo'; cross fingers
	error: derivation '/nix/store/mggc8dz13ackb49qca6m23zq4fpq132q-foo.drv' may not be deterministic: output '/nix/store/g3k47g0399fvjmbm0p0mnad74k4w8vkz-foo' differs
	$ echo $?
	104
2019-07-02 00:12:34 +02:00
..
builtins Fix segfault in builtin fetchurl with hashed mirrors + SRI hashes 2019-06-01 15:27:43 +02:00
binary-cache-store.cc Fix 'error 9 while decompressing xz file' 2019-06-24 21:59:51 +02:00
binary-cache-store.hh unsupported(): Show the name of the unsupported operation 2019-01-18 13:34:53 +01:00
build.cc build: add exit code for hash and check mismatches 2019-07-02 00:12:34 +02:00
builtins.hh Make <nix/buildenv.nix> a builtin builder 2018-03-20 17:28:09 +01:00
crypto.cc binary-cache-public-keys -> trusted-public-keys 2017-11-20 17:32:34 +01:00
crypto.hh
derivations.cc Move structured attrs handling into a separate class 2018-09-28 14:32:46 +02:00
derivations.hh Move structured attrs handling into a separate class 2018-09-28 14:32:46 +02:00
download.cc build: add exit code for hash and check mismatches 2019-07-02 00:12:34 +02:00
download.hh Refactor downloadCached() interface 2019-06-24 22:12:26 +02:00
export-import.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
fs-accessor.hh nix ls-{nar,store}: Return offset of files in the NAR if known 2017-12-07 01:07:07 +01:00
gc.cc findRootsNoTemp: fixes comment about findRuntimeRoots 2019-04-30 22:43:24 -04:00
globals.cc config: use all of XDG_CONFIG_DIRS 2018-10-31 09:24:43 +01:00
globals.hh Add '--no-net' convenience flag 2019-06-24 22:07:29 +02:00
http-binary-cache-store.cc Add '--no-net' convenience flag 2019-06-24 22:07:29 +02:00
legacy-ssh-store.cc unsupported(): Show the name of the unsupported operation 2019-01-18 13:34:53 +01:00
local-binary-cache-store.cc Make LocalBinaryCacheStore::narFromPath() run in constant memory 2018-05-30 13:34:57 +02:00
local-fs-store.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
local-store.cc Revert "Restore parent mount namespace before executing a child process" 2019-02-05 10:49:19 +01:00
local-store.hh findRoots(): Add 'censor' parameter 2019-03-14 13:53:34 +01:00
local.mk Remove mentions of libformat, it no longer exists 2019-01-05 14:31:29 -05:00
machines.cc getMachines(): Cache result 2019-04-01 21:09:35 +02:00
machines.hh Replace $NIX_REMOTE_SYSTEMS with an option "builder-files" 2017-05-02 15:46:09 +02:00
misc.cc Simplify the callback mechanism 2018-05-30 13:34:37 +02:00
nar-accessor.cc Provide random access to cached NARs 2017-12-07 01:07:07 +01:00
nar-accessor.hh Fix build on gcc 7 2017-12-16 00:49:31 +01:00
nar-info-disk-cache.cc Fix assertion failure in NarInfoDiskCache 2018-12-12 17:13:22 +01:00
nar-info-disk-cache.hh
nar-info.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
nar-info.hh
nix-store.pc.in pkg-config files: Use c++17 2019-03-14 14:11:12 +01:00
optimise-store.cc Fix optimise-store.cc to skip more paths on macOS 2018-06-14 12:34:55 -04:00
parsed-derivations.cc experimental/optional -> optional 2019-03-14 14:10:52 +01:00
parsed-derivations.hh experimental/optional -> optional 2019-03-14 14:10:52 +01:00
pathlocks.cc Fix 'deadlock: trying to re-acquire self-held lock' 2018-02-12 17:06:06 +01:00
pathlocks.hh Fix 'deadlock: trying to re-acquire self-held lock' 2018-02-12 17:06:06 +01:00
profiles.cc only delete things older than current gen and update logic in doc as 2018-03-01 22:59:00 -05:00
profiles.hh this updates issues that were addressed by people in pr 2018-03-01 21:47:57 -05:00
references.cc Fix some random -Wconversion warnings 2018-05-02 13:56:34 +02:00
references.hh
remote-fs-accessor.cc Provide random access to cached NARs 2017-12-07 01:07:07 +01:00
remote-fs-accessor.hh Provide random access to cached NARs 2017-12-07 01:07:07 +01:00
remote-store.cc findRoots(): Add 'censor' parameter 2019-03-14 13:53:34 +01:00
remote-store.hh experimental/optional -> optional 2019-03-14 14:10:52 +01:00
s3-binary-cache-store.cc Add a 5 seconds of timeouts to connect to S3. 2019-03-15 13:23:58 +01:00
s3-binary-cache-store.hh
s3.hh s3: make scheme configurable 2018-12-07 23:55:38 +01:00
sandbox-defaults.sb Remove extraneous comment 2017-11-08 16:17:32 +01:00
sandbox-minimal.sb Always use the Darwin sandbox 2017-06-06 18:44:49 +02:00
sandbox-network.sb OS X sandbox: Improve builtin sandbox profile 2017-05-31 17:25:51 +02:00
schema.sql
serve-protocol.hh Make adding paths via nix-store --serve run in constant memory 2018-08-03 21:21:16 +02:00
sqlite.cc Use extended SQLite error codes 2018-05-30 13:25:03 +02:00
sqlite.hh Use boost::format from the boost package 2018-03-14 19:24:04 +01:00
ssh-store.cc Make 'nix copy --from ssh://...' run in constant memory 2018-03-21 23:10:40 +01:00
ssh.cc Revert "Restore parent mount namespace before executing a child process" 2019-02-05 10:49:19 +01:00
ssh.hh SSHMaster: Bypass SSH when connecting to localhost 2018-08-03 21:20:38 +02:00
store-api.cc Fix 'error 9 while decompressing xz file' 2019-06-24 21:59:51 +02:00
store-api.hh nix-channel: Don't fetch binary-cache-url 2019-06-25 13:27:16 +02:00
worker-protocol.hh Make 'nix copy --to daemon' run in constant memory (daemon side) 2018-05-30 13:26:48 +02:00