File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11
11
parallel
12
12
] ;
13
13
fix = {
14
- # Workaround to get `resholve` to substitute the `nix` called by `parallel`
14
+ # Workaround to get `resholve` to substitute the `nix` and `jq` called by `parallel`
15
15
"$NIX_COMMAND" = [ "${ pkgs . nix } /bin/nix" ] ;
16
+ "$JQ_COMMAND" = [ "${ pkgs . jq } /bin/jq" ] ;
16
17
} ;
17
18
execer = [
18
19
"cannot:${ pkgs . nix } /bin/nix"
Original file line number Diff line number Diff line change @@ -13,15 +13,16 @@ usage() {
13
13
}
14
14
15
15
# Workaround for `resholve`.
16
- # The `nix` invoked by `parallel` does not get substituted otherwise.
16
+ # The `nix` and `jq` invoked by `parallel` do not get substituted otherwise.
17
17
NIX_COMMAND=" nix"
18
+ JQ_COMMAND=" jq"
18
19
19
20
CI_ATTR=" ci"
20
21
CI_SUFFIX_REGEX=" \" ^$CI_ATTR .\" "
21
22
22
23
# JSON array of the flake outputs under `ci` e.g., `["ci.alpha-deploy-spec","ci.bravo-deploy-spec"]`
23
24
ci_outputs_json () {
24
- nix search " $1 #$CI_ATTR " --json |
25
+ nix search " $1 #$CI_ATTR " --json --allow-import-from-derivation |
25
26
jq -rc ' keys_unsorted'
26
27
}
27
28
@@ -37,7 +38,7 @@ if [ $# -eq 1 ] || [ $# -eq 2 ]; then
37
38
matrix=$(
38
39
ci_outputs_json " $1 " |
39
40
jq -rc ' .[]' |
40
- parallel " $NIX_COMMAND " path-info " $1 #{}" --json ' |' jq -c --arg FLAKE_OUTPUT ' {}' " $PATH_INFO_FILTER " |
41
+ parallel " $NIX_COMMAND " path-info " $1 #{}" --json --allow-import-from-derivation ' |' " $JQ_COMMAND " -c --arg FLAKE_OUTPUT ' {}' " $PATH_INFO_FILTER " |
41
42
jq -sc # Combine the JSON objects into an array
42
43
)
43
44
You can’t perform that action at this time.
0 commit comments