File tree 3 files changed +52
-0
lines changed
3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ source ./common.sh
2
+
3
+ sed -i ' s/experimental-features .*/& ca-derivations ca-references/' " $NIX_CONF_DIR " /nix.conf
4
+
5
+ export REMOTE_STORE_DIR=" $TEST_ROOT /remote_store"
6
+ export REMOTE_STORE=" file://$REMOTE_STORE_DIR "
7
+
8
+ rm -rf $REMOTE_STORE_DIR
9
+ clearStore
10
+
11
+ nix copy --to " $REMOTE_STORE " -f nondeterministic.nix dep1
12
+ clearStore
13
+ sleep 2 # To make sure that `$(date)` will be different
14
+ nix build -f nondeterministic.nix dep2
15
+ nix build --substituters " $REMOTE_STORE " -f nondeterministic.nix dep1 --no-require-sigs
16
+ nix build -f nondeterministic.nix toplevel
Original file line number Diff line number Diff line change
1
+ with import ./config.nix ;
2
+
3
+ let mkCADerivation = args : mkDerivation ( {
4
+ __contentAddressed = true ;
5
+ outputHashMode = "recursive" ;
6
+ outputHashAlgo = "sha256" ;
7
+ } // args ) ;
8
+ in
9
+
10
+ rec {
11
+ currentTime = mkCADerivation {
12
+ name = "current-time" ;
13
+ buildCommand = ''
14
+ mkdir $out
15
+ echo $(date) > $out/current-time
16
+ '' ;
17
+ } ;
18
+ dep = seed : mkCADerivation {
19
+ name = "dep" ;
20
+ inherit seed ;
21
+ buildCommand = ''
22
+ echo ${ currentTime } > $out
23
+ '' ;
24
+ } ;
25
+ dep1 = dep 1 ;
26
+ dep2 = dep 2 ;
27
+ toplevel = mkCADerivation {
28
+ name = "toplevel" ;
29
+ buildCommand = ''
30
+ test ${ dep1 } == ${ dep2 }
31
+ touch $out
32
+ '' ;
33
+ } ;
34
+ }
35
+
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ nix_tests = \
44
44
build.sh \
45
45
compute-levels.sh \
46
46
ca/build.sh \
47
+ ca/duplicate-realisation-in-closure.sh \
47
48
ca/substitute.sh \
48
49
ca/signatures.sh \
49
50
ca/nix-run.sh \
You can’t perform that action at this time.
0 commit comments