File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 69
69
requiredSystemFeatures = [ "baz" ] ;
70
70
} ;
71
71
72
+ input4 = mkDerivation {
73
+ shell = busybox ;
74
+ name = "build-remote-input-4" ;
75
+ buildCommand = ''
76
+ echo hi-input3
77
+ read x < ${ input3 }
78
+ echo $x BAZ > $out
79
+ '' ;
80
+ rejectSystemFeatures = [ "bar" ] ;
81
+ requiredSystemFeatures = [ "foo" ] ;
82
+ } ;
83
+
72
84
in
73
85
74
86
mkDerivation {
75
87
shell = busybox ;
76
88
name = "build-remote" ;
77
- passthru = { inherit input1 input2 input3 ; } ;
89
+ passthru = {
90
+ inherit
91
+ input1
92
+ input2
93
+ input3
94
+ input4
95
+ ;
96
+ } ;
78
97
buildCommand = ''
79
98
read x < ${ input1 }
80
99
read y < ${ input3 }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ builders=(
23
23
" ssh://localhost?remote-store=$TEST_ROOT /machine1?system-features=$( join_by " %20" foo " ${EXTRA_SYSTEM_FEATURES[@]} " ) - - 1 1 $( join_by " ," foo " ${EXTRA_SYSTEM_FEATURES[@]} " ) "
24
24
" $TEST_ROOT /machine2 - - 1 1 $( join_by " ," bar " ${EXTRA_SYSTEM_FEATURES[@]} " ) "
25
25
" ssh-ng://localhost?remote-store=$TEST_ROOT /machine3?system-features=$( join_by " %20" baz " ${EXTRA_SYSTEM_FEATURES[@]} " ) - - 1 1 $( join_by " ," baz " ${EXTRA_SYSTEM_FEATURES[@]} " ) "
26
+ " $TEST_ROOT /machine4 - - 1 1 $( join_by " ," bar foo " ${EXTRA_SYSTEM_FEATURES[@]} " ) "
26
27
)
27
28
28
29
chmod -R +w " $TEST_ROOT /machine" * || true
@@ -70,6 +71,12 @@ echo "$output" | grepQuietInverse builder-build-remote-input-2.sh
70
71
echo " $output " | grepQuiet builder-build-remote-input-3.sh
71
72
unset output
72
73
74
+ # Ensure that input4 was built on store4 due to the required feature.
75
+ output=$( nix path-info --store " $TEST_ROOT /machine4" --all)
76
+ echo " $output " | grepQuietInverse builder-build-remote-input-1.sh
77
+ echo " $output " | grepQuietInverse builder-build-remote-input-2.sh
78
+ echo " $output " | grepQuietInverse builder-build-remote-input-3.sh
79
+ unset output
73
80
74
81
for i in input1 input3; do
75
82
nix log --store " $TEST_ROOT /machine0" --file " $file " --arg busybox " $busybox " " passthru.$i " | grep hi-$i
You can’t perform that action at this time.
0 commit comments