ci: eval builds as single attrset
This is much safer and might also be faster. Passing `system` could still be hypothetically unsafe, but I doubt nixpkgs will ever have a system name with a dot in it for this specific reason.
This commit is contained in:
parent
bd0759b398
commit
e9bc288e35
@ -47,14 +47,14 @@ build_systems () {
|
|||||||
# system should be set in `nix develop` but just in case
|
# system should be set in `nix develop` but just in case
|
||||||
local system
|
local system
|
||||||
system="${system:-$(nix eval --impure --raw --expr 'builtins.currentSystem')}"
|
system="${system:-$(nix eval --impure --raw --expr 'builtins.currentSystem')}"
|
||||||
nix eval --json .#legacyPackages."${system}".specialisedNixosConfigurations --apply 'builtins.attrNames' \
|
#nix eval --json .#legacyPackages."${system}".specialisedNixosConfigurations --apply 'builtins.attrNames' \
|
||||||
| jq -c '.[]' \
|
# | jq -c '.[]' \
|
||||||
| while read -r line ; do
|
# | while read -r line ; do
|
||||||
local build
|
# local build
|
||||||
build="$(printf '%s' "$line" | jq -r)"
|
# build="$(printf '%s' "$line" | jq -r)"
|
||||||
run_builds ".#legacyPackages.${system}.specialisedNixosConfigurations.${build}"
|
# run_builds ".#legacyPackages.${system}.specialisedNixosConfigurations.${build}"
|
||||||
done
|
# done
|
||||||
# run_builds ".#legacyPackages.${system}.specialisedNixosConfigurations"
|
run_builds ".#legacyPackages.${system}.specialisedNixosConfigurations"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user