diff --git a/ci/run_builds.sh b/ci/run_builds.sh index 2b19d1e..5654288 100755 --- a/ci/run_builds.sh +++ b/ci/run_builds.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# shellcheck disable=SC2317 +# ^ SC2317 (Command appears to be unreachable.) set -Exo pipefail @@ -21,7 +23,7 @@ run_builds () { done } -build_systems () { +_build_systems () { case "$system" in # TODO this is messy and hard-coded, make an attribute set for # each system containing the specializations as well as the nospec ver @@ -39,6 +41,23 @@ build_systems () { 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 () { run_builds .\#packages."${system}".redlib } diff --git a/flake.nix b/flake.nix index 26c1253..01579f5 100644 --- a/flake.nix +++ b/flake.nix @@ -204,6 +204,7 @@ devShells = { ci = pkgs.mkShell { buildInputs = with pkgs; [ + jq nix-update nix-fast-build ];