diff options
author | regnat <rg@regnat.ovh> | 2021-05-19 13:35:46 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-06-23 11:18:31 +0200 |
commit | a5df669bc685834b16de0ab57723ff734c10d2f7 (patch) | |
tree | 2dfa8c06b77df149c1dd73f177af07b697261531 /tests/ca/nondeterministic.nix | |
parent | 4a5aa1dbf625af795b19badd66c0a0891c9d5b49 (diff) |
Add a test for the “two glibc” issue
Diffstat (limited to 'tests/ca/nondeterministic.nix')
-rw-r--r-- | tests/ca/nondeterministic.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/ca/nondeterministic.nix b/tests/ca/nondeterministic.nix new file mode 100644 index 000000000..d6d099a3e --- /dev/null +++ b/tests/ca/nondeterministic.nix @@ -0,0 +1,35 @@ +with import ./config.nix; + +let mkCADerivation = args: mkDerivation ({ + __contentAddressed = true; + outputHashMode = "recursive"; + outputHashAlgo = "sha256"; +} // args); +in + +rec { + currentTime = mkCADerivation { + name = "current-time"; + buildCommand = '' + mkdir $out + echo $(date) > $out/current-time + ''; + }; + dep = seed: mkCADerivation { + name = "dep"; + inherit seed; + buildCommand = '' + echo ${currentTime} > $out + ''; + }; + dep1 = dep 1; + dep2 = dep 2; + toplevel = mkCADerivation { + name = "toplevel"; + buildCommand = '' + test ${dep1} == ${dep2} + touch $out + ''; + }; +} + |