diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8fc0de773..220b7fead 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,8 +26,16 @@ jobs: - run: | set -eux - nix flake check --all-systems + # Ensure all the checks can be built without internet + nix flake check --all-systems --jobs 0 + nix build .#tarballs_json + cat result + + nix build .#closures_json + cat result + nix build .#closures_nix + cat result mkdir ./artifacts cat './result' > './artifacts/universal' diff --git a/flake.nix b/flake.nix index 81ecf86cf..f0799d8f6 100644 --- a/flake.nix +++ b/flake.nix @@ -26,11 +26,23 @@ in { closures = forAllSystems ({ system, ... }: nix.packages."${system}".default); + tarballs = forAllSystems ({ system, ... }: nix.checks."${system}".binaryTarball); + checks = forAllSystems ({ system, ... }: { - fetchable = nix.packages."${system}".default; + closure = nix.packages."${system}".default; + tarball = nix.checks."${system}".binaryTarball; }); packages = forAllSystems ({ system, pkgs, ... }: { + tarballs_json = pkgs.runCommand "tarballs.json" + { + buildInputs = [ pkgs.jq ]; + passAsFile = [ "json" ]; + json = builtins.toJSON (self.tarballs); + } '' + cat "$jsonPath" | jq . > $out + ''; + closures_json = pkgs.runCommand "versions.json" { buildInputs = [ pkgs.jq ];