Skip to content

Commit

Permalink
Create an output of tarballs too
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Mar 19, 2024
1 parent 67b43cb commit 476955b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
14 changes: 13 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down

0 comments on commit 476955b

Please # to comment.