ci: dynamic system build list
This commit is contained in:
parent
8c7d95f0fd
commit
d768399a4e
@ -1,4 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# shellcheck disable=SC2317
|
||||||
|
# ^ SC2317 (Command appears to be unreachable.)
|
||||||
|
|
||||||
set -Exo pipefail
|
set -Exo pipefail
|
||||||
|
|
||||||
@ -21,7 +23,7 @@ run_builds () {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
build_systems () {
|
_build_systems () {
|
||||||
case "$system" in
|
case "$system" in
|
||||||
# TODO this is messy and hard-coded, make an attribute set for
|
# TODO this is messy and hard-coded, make an attribute set for
|
||||||
# each system containing the specializations as well as the nospec ver
|
# each system containing the specializations as well as the nospec ver
|
||||||
@ -39,6 +41,23 @@ build_systems () {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
build_systems () {
|
||||||
|
# system should be set in `nix develop` but just in case
|
||||||
|
local system
|
||||||
|
system="${system:-$(nix eval --impure --raw --expr 'builtins.currentSystem')}"
|
||||||
|
nix eval --json .#legacyPackages."${system}".specialisedNixosConfigurations --apply 'builtins.attrNames' \
|
||||||
|
| jq -c '.[]' \
|
||||||
|
| while read -r line ; do
|
||||||
|
local build
|
||||||
|
build="$(printf '%s' "$line" | jq -r)"
|
||||||
|
run_builds ".#legacyPackages.${system}.specialisedNixosConfigurations.${build}"
|
||||||
|
done
|
||||||
|
# run_builds ".#legacyPackages.${system}.specialisedNixosConfigurations"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
build_packages () {
|
build_packages () {
|
||||||
run_builds .\#packages."${system}".redlib
|
run_builds .\#packages."${system}".redlib
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user