1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
|
# To run these tests:
# nix-build -A tests.stdenv
{
stdenv,
pkgs,
lib,
config,
testers,
}:
let
# tests can be based on builtins.derivation and stage0 or bootstrapTools directly to minimize rebuilds
# see test 'make-symlinks-relative' in ./hooks.nix as an example.
initialBash = if stdenv ? stage0 then stdenv.stage0.bash else stdenv.bootstrapTools;
initialPath = if stdenv ? stage0 then stdenv.stage0.initialPath else [ stdenv.bootstrapTools ];
# early enough not to rebuild gcc but late enough to have patchelf
earlyPkgs = stdenv.__bootPackages.stdenv.__bootPackages or pkgs;
earlierPkgs =
stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages
or earlyPkgs;
# use a early stdenv so when hacking on stdenv this test can be run quickly
bootStdenv = earlyPkgs.stdenv.__bootPackages.stdenv.__bootPackages.stdenv or earlyPkgs.stdenv;
pkgsStructured = import pkgs.path {
config = config // {
structuredAttrsByDefault = true;
};
inherit (stdenv.hostPlatform) system;
};
bootStdenvStructuredAttrsByDefault =
pkgsStructured.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv
or pkgsStructured.stdenv;
runCommand = earlierPkgs.runCommand;
ccWrapperSubstitutionsTest =
{
name,
stdenv',
extraAttrs ? { },
}:
stdenv'.cc.overrideAttrs (
previousAttrs:
(
{
inherit name;
postFixup = previousAttrs.postFixup + ''
declare -p wrapperName
echo "env.wrapperName = $wrapperName"
[[ $wrapperName == "CC_WRAPPER" ]] || (echo "'\$wrapperName' was not 'CC_WRAPPER'" && false)
declare -p suffixSalt
echo "env.suffixSalt = $suffixSalt"
[[ $suffixSalt == "${stdenv'.cc.suffixSalt}" ]] || (echo "'\$suffxSalt' was not '${stdenv'.cc.suffixSalt}'" && false)
grep -q "@out@" $out/bin/cc || echo "@out@ in $out/bin/cc was substituted"
grep -q "@suffixSalt@" $out/bin/cc && (echo "$out/bin/cc contains unsubstituted variables" && false)
touch $out
'';
}
// extraAttrs
)
);
testEnvAttrset =
{
name,
stdenv',
extraAttrs ? { },
}:
stdenv'.mkDerivation (
{
inherit name;
env = {
string = "testing-string";
};
passAsFile = [ "buildCommand" ];
buildCommand = ''
declare -p string
echo "env.string = $string"
[[ $string == "testing-string" ]] || (echo "'\$string' was not 'testing-string'" && false)
[[ "$(declare -p string)" == 'declare -x string="testing-string"' ]] || (echo "'\$string' was not exported" && false)
touch $out
'';
}
// extraAttrs
);
testPrependAndAppendToVar =
{
name,
stdenv',
extraAttrs ? { },
}:
stdenv'.mkDerivation (
{
inherit name;
env = {
string = "testing-string";
};
passAsFile = [ "buildCommand" ] ++ lib.optionals (extraAttrs ? extraTest) [ "extraTest" ];
buildCommand = ''
declare -p string
appendToVar string hello
# test that quoted strings work
prependToVar string "world"
declare -p string
declare -A associativeArray=(["X"]="Y")
[[ $(appendToVar associativeArray "fail" 2>&1) =~ "trying to use" ]] || (echo "appendToVar did not throw appending to associativeArray" && false)
[[ $(prependToVar associativeArray "fail" 2>&1) =~ "trying to use" ]] || (echo "prependToVar did not throw prepending associativeArray" && false)
[[ $string == "world testing-string hello" ]] || (echo "'\$string' was not 'world testing-string hello'" && false)
# test appending to a unset variable
appendToVar nonExistant created hello
declare -p nonExistant
if [[ -n $__structuredAttrs ]]; then
[[ "''${nonExistant[@]}" == "created hello" ]]
else
# there's a extra " " in front here and a extra " " in the end of prependToVar
# shouldn't matter because these functions will mostly be used for $*Flags and the Flag variable will in most cases already exist
[[ "$nonExistant" == " created hello" ]]
fi
eval "$extraTest"
touch $out
'';
}
// extraAttrs
);
testConcatTo =
{
name,
stdenv',
extraAttrs ? { },
}:
stdenv'.mkDerivation (
{
inherit name;
string = "a *";
list = [
"c"
"d"
];
passAsFile = [ "buildCommand" ] ++ lib.optionals (extraAttrs ? extraTest) [ "extraTest" ];
buildCommand = ''
declare -A associativeArray=(["X"]="Y")
[[ $(concatTo nowhere associativeArray 2>&1) =~ "trying to use" ]] || (echo "concatTo did not throw concatenating associativeArray" && false)
empty_array=()
empty_string=""
declare -a flagsArray
concatTo flagsArray string list notset=e=f empty_array=g empty_string=h
declare -p flagsArray
[[ "''${flagsArray[0]}" == "a" ]] || (echo "'\$flagsArray[0]' was not 'a'" && false)
[[ "''${flagsArray[1]}" == "*" ]] || (echo "'\$flagsArray[1]' was not '*'" && false)
[[ "''${flagsArray[2]}" == "c" ]] || (echo "'\$flagsArray[2]' was not 'c'" && false)
[[ "''${flagsArray[3]}" == "d" ]] || (echo "'\$flagsArray[3]' was not 'd'" && false)
[[ "''${flagsArray[4]}" == "e=f" ]] || (echo "'\$flagsArray[4]' was not 'e=f'" && false)
[[ "''${flagsArray[5]}" == "g" ]] || (echo "'\$flagsArray[5]' was not 'g'" && false)
[[ "''${flagsArray[6]}" == "h" ]] || (echo "'\$flagsArray[6]' was not 'h'" && false)
# test concatenating to unset variable
concatTo nonExistant string list notset=e=f empty_array=g empty_string=h
declare -p nonExistant
[[ "''${nonExistant[0]}" == "a" ]] || (echo "'\$nonExistant[0]' was not 'a'" && false)
[[ "''${nonExistant[1]}" == "*" ]] || (echo "'\$nonExistant[1]' was not '*'" && false)
[[ "''${nonExistant[2]}" == "c" ]] || (echo "'\$nonExistant[2]' was not 'c'" && false)
[[ "''${nonExistant[3]}" == "d" ]] || (echo "'\$nonExistant[3]' was not 'd'" && false)
[[ "''${nonExistant[4]}" == "e=f" ]] || (echo "'\$nonExistant[4]' was not 'e=f'" && false)
[[ "''${nonExistant[5]}" == "g" ]] || (echo "'\$nonExistant[5]' was not 'g'" && false)
[[ "''${nonExistant[6]}" == "h" ]] || (echo "'\$nonExistant[6]' was not 'h'" && false)
eval "$extraTest"
touch $out
'';
}
// extraAttrs
);
testConcatStringsSep =
{ name, stdenv' }:
stdenv'.mkDerivation {
inherit name;
# NOTE: Testing with "&" as separator is intentional, because unquoted
# "&" has a special meaning in the "${var//pattern/replacement}" syntax.
# Cf. https://github.com/NixOS/nixpkgs/pull/318614#discussion_r1706191919
passAsFile = [ "buildCommand" ];
buildCommand = ''
declare -A associativeArray=(["X"]="Y")
[[ $(concatStringsSep ";" associativeArray 2>&1) =~ "trying to use" ]] || (echo "concatStringsSep did not throw concatenating associativeArray" && false)
string="lorem ipsum dolor sit amet"
stringWithSep="$(concatStringsSep "&" string)"
[[ "$stringWithSep" == "lorem&ipsum&dolor&sit&amet" ]] || (echo "'\$stringWithSep' was not 'lorem&ipsum&dolor&sit&amet'" && false)
array=("lorem ipsum" "dolor" "sit amet")
arrayWithSep="$(concatStringsSep "&" array)"
[[ "$arrayWithSep" == "lorem ipsum&dolor&sit amet" ]] || (echo "'\$arrayWithSep' was not 'lorem ipsum&dolor&sit amet'" && false)
array=("lorem ipsum" "dolor" "sit amet")
arrayWithSep="$(concatStringsSep "++" array)"
[[ "$arrayWithSep" == "lorem ipsum++dolor++sit amet" ]] || (echo "'\$arrayWithSep' was not 'lorem ipsum++dolor++sit amet'" && false)
array=("lorem ipsum" "dolor" "sit amet")
arrayWithSep="$(concatStringsSep " and " array)"
[[ "$arrayWithSep" == "lorem ipsum and dolor and sit amet" ]] || (echo "'\$arrayWithSep' was not 'lorem ipsum and dolor and sit amet'" && false)
touch $out
'';
};
testInputDerivationDep = stdenv.mkDerivation {
name = "test-input-derivation-dependency";
buildCommand = "touch $out";
};
testInputDerivation =
attrs:
(stdenv.mkDerivation (
attrs
// {
buildInputs = [ testInputDerivationDep ];
}
)).inputDerivation
// {
meta = { };
};
in
{
# tests for hooks in `stdenv.defaultNativeBuildInputs`
hooks = lib.recurseIntoAttrs (
import ./hooks.nix {
stdenv = bootStdenv;
pkgs = earlyPkgs;
inherit initialPath initialBash lib;
}
);
# `libiconv` should be an alias for `darwin.libiconv`. Checked here and not in
# the Darwin stdenv because comparing derivations forces `outPath`, which is
# guarded behind validity, which reads `config` — a cycle during bootstrap.
darwin-libiconv-alias =
assert stdenv.hostPlatform.isDarwin -> pkgs.libiconv == pkgs.darwin.libiconv;
pkgs.emptyFile;
outputs-no-out =
runCommand "outputs-no-out-assert"
{
result = earlierPkgs.testers.testBuildFailure (
bootStdenv.mkDerivation {
NIX_DEBUG = 1;
name = "outputs-no-out";
outputs = [ "foo" ];
buildPhase = ":";
installPhase = ''
touch $foo
'';
}
);
# Assumption: the first output* variable to be configured is
# _overrideFirst outputDev "dev" "out"
expectedMsg = "error: _assignFirst: could not find a non-empty variable whose name to assign to outputDev.\n The following variables were all unset or empty:\n dev out";
}
''
grep -F "$expectedMsg" $result/testBuildFailure.log >/dev/null
touch $out
'';
test-env-attrset = testEnvAttrset {
name = "test-env-attrset";
stdenv' = bootStdenv;
};
# Check that mkDerivation rejects MD5 hashes
rejectedHashes = lib.recurseIntoAttrs {
md5 =
let
drv = runCommand "md5 outputHash rejected" {
outputHash = "md5-fPt7dxVVP7ffY3MxkQdwVw==";
} "true";
in
assert !(builtins.tryEval drv).success;
{ };
};
test-inputDerivation =
let
inherit
(stdenv.mkDerivation {
dep1 = derivation {
name = "dep1";
builder = "/bin/sh";
args = [
"-c"
": > $out"
];
inherit (stdenv.buildPlatform) system;
};
dep2 = derivation {
name = "dep2";
builder = "/bin/sh";
args = [
"-c"
": > $out"
];
inherit (stdenv.buildPlatform) system;
};
passAsFile = [ "dep2" ];
})
inputDerivation
;
in
runCommand "test-inputDerivation"
{
exportReferencesGraph = [
"graph"
inputDerivation
];
}
''
grep ${inputDerivation.dep1} graph
grep ${inputDerivation.dep2} graph
touch $out
'';
test-inputDerivation-fixed-output =
let
inherit
(stdenv.mkDerivation {
dep1 = derivation {
name = "dep1";
builder = "/bin/sh";
args = [
"-c"
": > $out"
];
inherit (stdenv.buildPlatform) system;
};
dep2 = derivation {
name = "dep2";
builder = "/bin/sh";
args = [
"-c"
": > $out"
];
inherit (stdenv.buildPlatform) system;
};
name = "meow";
outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=";
outputHashMode = "flat";
outputHashAlgo = "sha256";
buildCommand = ''
touch $out
'';
passAsFile = [ "dep2" ];
})
inputDerivation
;
in
runCommand "test-inputDerivation"
{
exportReferencesGraph = [
"graph"
inputDerivation
];
}
''
grep ${inputDerivation.dep1} graph
grep ${inputDerivation.dep2} graph
touch $out
'';
test-inputDerivation-structured = testInputDerivation {
name = "test-inDrv-structured";
__structuredAttrs = true;
};
test-inputDerivation-allowedReferences = testInputDerivation {
name = "test-inDrv-allowedReferences";
allowedReferences = [ ];
};
test-inputDerivation-disallowedReferences = testInputDerivation {
name = "test-inDrv-disallowedReferences";
disallowedReferences = [ "${testInputDerivationDep}" ];
};
test-inputDerivation-allowedRequisites = testInputDerivation {
name = "test-inDrv-allowedRequisites";
allowedRequisites = [ ];
};
test-inputDerivation-disallowedRequisites = testInputDerivation {
name = "test-inDrv-disallowedRequisites";
disallowedRequisites = [ "${testInputDerivationDep}" ];
};
test-inputDerivation-structured-allowedReferences = testInputDerivation {
name = "test-inDrv-structured-allowedReferences";
__structuredAttrs = true;
outputChecks.out.allowedReferences = [ ];
};
test-inputDerivation-structured-disallowedReferences = testInputDerivation {
name = "test-inDrv-structured-disallowedReferences";
__structuredAttrs = true;
outputChecks.out.disallowedReferences = [ "${testInputDerivationDep}" ];
};
test-inputDerivation-structured-allowedRequisites = testInputDerivation {
name = "test-inDrv-structured-allowedRequisites";
__structuredAttrs = true;
outputChecks.out.allowedRequisites = [ ];
};
test-inputDerivation-structured-disallowedRequisites = testInputDerivation {
name = "test-inDrv-structured-disallowedRequisites";
__structuredAttrs = true;
outputChecks.out.disallowedRequisites = [ "${testInputDerivationDep}" ];
};
test-prepend-append-to-var = testPrependAndAppendToVar {
name = "test-prepend-append-to-var";
stdenv' = bootStdenv;
};
test-concat-to = testConcatTo {
name = "test-concat-to";
stdenv' = bootStdenv;
};
test-concat-strings-sep = testConcatStringsSep {
name = "test-concat-strings-sep";
stdenv' = bootStdenv;
};
test-structured-env-attrset = testEnvAttrset {
name = "test-structured-env-attrset";
stdenv' = bootStdenv;
extraAttrs = {
__structuredAttrs = true;
};
};
test-cc-wrapper-substitutions = ccWrapperSubstitutionsTest {
name = "test-cc-wrapper-substitutions";
stdenv' = bootStdenv;
};
tests-stdenv-gcc-stageCompare = pkgs.callPackage ./gcc-stageCompare.nix { };
ensure-no-execve-in-setup-sh =
derivation {
name = "ensure-no-execve-in-setup-sh";
inherit (stdenv.hostPlatform) system;
builder = "${initialBash}/bin/bash";
PATH = "${pkgs.strace}/bin:${lib.strings.makeSearchPath "bin" initialPath}";
initialPath = initialPath ++ [
pkgs.strace
];
args = [
"-c"
''
countCall() {
echo "$stats" | tr -s ' ' | grep "$1" | cut -d ' ' -f5
}
# prevent setup.sh from running `nproc` when cores=0
# (this would mess up the syscall stats)
export NIX_BUILD_CORES=1
echo "Analyzing setup.sh with strace"
stats=$(strace -fc bash -c ". ${../../stdenv/generic/setup.sh}" 2>&1)
echo "$stats" | head -n15
# fail if execve calls is > 1
stats=$(strace -fc bash -c ". ${../../stdenv/generic/setup.sh}" 2>&1)
execveCalls=$(countCall execve)
if [ "$execveCalls" -gt 1 ]; then
echo "execve calls: $execveCalls; expected: 1"
echo "ERROR: setup.sh should not launch additional processes when being sourced"
exit 1
else
echo "setup.sh doesn't launch extra processes when sourcing, as expected"
fi
touch $out
''
];
}
// {
meta = { };
};
structuredAttrsByDefault = lib.recurseIntoAttrs {
hooks = lib.recurseIntoAttrs (
import ./hooks.nix {
stdenv = bootStdenvStructuredAttrsByDefault;
pkgs = earlyPkgs;
inherit initialBash initialPath lib;
}
);
test-cc-wrapper-substitutions = ccWrapperSubstitutionsTest {
name = "test-cc-wrapper-substitutions-structuredAttrsByDefault";
stdenv' = bootStdenvStructuredAttrsByDefault;
};
test-structured-env-attrset = testEnvAttrset {
name = "test-structured-env-attrset-structuredAttrsByDefault";
stdenv' = bootStdenvStructuredAttrsByDefault;
};
test-prepend-append-to-var = testPrependAndAppendToVar {
name = "test-prepend-append-to-var-structuredAttrsByDefault";
stdenv' = bootStdenvStructuredAttrsByDefault;
extraAttrs = {
# will be a bash indexed array in attrs.sh
# declare -a list=('a' 'b' )
# and a json array in attrs.json
# "list":["a","b"]
list = [
"a"
"b"
];
# will be a bash associative array(dictionary) in attrs.sh
# declare -A array=(['a']='1' ['b']='2' )
# and a json object in attrs.json
# {"array":{"a":"1","b":"2"}
array = {
a = "1";
b = "2";
};
extraTest = ''
declare -p array
array+=(["c"]="3")
declare -p array
[[ "''${array[c]}" == "3" ]] || (echo "c element of '\$array' was not '3'" && false)
declare -p list
prependToVar list hello
# test that quoted strings work
appendToVar list "world"
declare -p list
[[ "''${list[0]}" == "hello" ]] || (echo "first element of '\$list' was not 'hello'" && false)
[[ "''${list[1]}" == "a" ]] || (echo "first element of '\$list' was not 'a'" && false)
[[ "''${list[-1]}" == "world" ]] || (echo "last element of '\$list' was not 'world'" && false)
'';
};
};
test-concat-to = testConcatTo {
name = "test-concat-to-structuredAttrsByDefault";
stdenv' = bootStdenvStructuredAttrsByDefault;
extraAttrs = {
# test that whitespace is kept in the bash array for structuredAttrs
listWithSpaces = [
"c c"
"d d"
];
extraTest = ''
declare -a flagsWithSpaces
concatTo flagsWithSpaces string listWithSpaces
declare -p flagsWithSpaces
[[ "''${flagsWithSpaces[0]}" == "a" ]] || (echo "'\$flagsWithSpaces[0]' was not 'a'" && false)
[[ "''${flagsWithSpaces[1]}" == "*" ]] || (echo "'\$flagsWithSpaces[1]' was not '*'" && false)
[[ "''${flagsWithSpaces[2]}" == "c c" ]] || (echo "'\$flagsWithSpaces[2]' was not 'c c'" && false)
[[ "''${flagsWithSpaces[3]}" == "d d" ]] || (echo "'\$flagsWithSpaces[3]' was not 'd d'" && false)
'';
};
};
test-concat-strings-sep = testConcatStringsSep {
name = "test-concat-strings-sep-structuredAttrsByDefault";
stdenv' = bootStdenvStructuredAttrsByDefault;
};
test-golden-example-structuredAttrs =
let
goldenSh = earlyPkgs.writeText "goldenSh" ''
declare -A EXAMPLE_ATTRS=(['foo']='bar' )
declare EXAMPLE_BOOL_FALSE=
declare EXAMPLE_BOOL_TRUE=1
declare EXAMPLE_INT=123
declare EXAMPLE_INT_NEG=-123
declare -a EXAMPLE_LIST=('foo' 'bar' )
declare EXAMPLE_STR='foo bar'
'';
goldenJson = earlyPkgs.writeText "goldenSh" ''
{
"EXAMPLE_ATTRS": {
"foo": "bar"
},
"EXAMPLE_BOOL_FALSE": false,
"EXAMPLE_BOOL_TRUE": true,
"EXAMPLE_INT": 123,
"EXAMPLE_INT_NEG": -123,
"EXAMPLE_LIST": [
"foo",
"bar"
],
"EXAMPLE_NESTED_ATTRS": {
"foo": {
"bar": "baz"
}
},
"EXAMPLE_NESTED_LIST": [
[
"foo",
"bar"
],
[
"baz"
]
],
"EXAMPLE_STR": "foo bar"
}
'';
in
bootStdenvStructuredAttrsByDefault.mkDerivation {
name = "test-golden-example-structuredAttrsByDefault";
nativeBuildInputs = [ earlyPkgs.jq ];
EXAMPLE_BOOL_TRUE = true;
EXAMPLE_BOOL_FALSE = false;
EXAMPLE_INT = 123;
EXAMPLE_INT_NEG = -123;
EXAMPLE_STR = "foo bar";
EXAMPLE_LIST = [
"foo"
"bar"
];
EXAMPLE_NESTED_LIST = [
[
"foo"
"bar"
]
[ "baz" ]
];
EXAMPLE_ATTRS = {
foo = "bar";
};
EXAMPLE_NESTED_ATTRS = {
foo.bar = "baz";
};
inherit goldenSh;
inherit goldenJson;
buildCommand = ''
mkdir -p $out
cat $NIX_ATTRS_SH_FILE | grep "EXAMPLE" | grep -v -E 'installPhase|jq' > $out/sh
jq 'with_entries(select(.key|match("EXAMPLE")))' $NIX_ATTRS_JSON_FILE > $out/json
diff $out/sh $goldenSh
diff $out/json $goldenJson
'';
};
};
}
|