diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index a5ec07e6c..8b0963fdc 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -82,6 +82,9 @@ jobs: echo Building the project and its devShell nix build .#check --log-lines 500 --show-trace + echo Build the bundle + nix build .#pact-binary-bundle --log-lines 500 --show-trace --out-link pact-binary-bundle + echo Build the recursive output nix build .#recursive.allDerivations --log-lines 500 --show-trace @@ -89,4 +92,9 @@ jobs: run: | echo Validating pact version nix run pact --version - + + - name: Publish the bundle + uses: actions/upload-artifact@v3 + with: + name: pact-bundle.${{ matrix.os }} + path: pact-binary-bundle diff --git a/flake.lock b/flake.lock index aee452df4..40b2adaac 100644 --- a/flake.lock +++ b/flake.lock @@ -256,6 +256,22 @@ "type": "github" } }, + "nix-bundle-exe": { + "flake": false, + "locked": { + "lastModified": 1682949567, + "narHash": "sha256-K9PT8LVvTLOm3gX9ZFxag0X85DFgB2vvJB+S12disWw=", + "owner": "3noch", + "repo": "nix-bundle-exe", + "rev": "3522ae68aa4188f4366ed96b41a5881d6a88af97", + "type": "github" + }, + "original": { + "owner": "3noch", + "repo": "nix-bundle-exe", + "type": "github" + } + }, "nix-tools-static": { "flake": false, "locked": { @@ -324,7 +340,8 @@ "root": { "inputs": { "flake-utils": "flake-utils", - "hs-nix-infra": "hs-nix-infra" + "hs-nix-infra": "hs-nix-infra", + "nix-bundle-exe": "nix-bundle-exe" } }, "systems": { diff --git a/flake.nix b/flake.nix index af9e1d683..35de98bed 100644 --- a/flake.nix +++ b/flake.nix @@ -4,9 +4,10 @@ inputs = { hs-nix-infra.url = "github:kadena-io/hs-nix-infra"; flake-utils.url = "github:numtide/flake-utils"; + nix-bundle-exe = { url = "github:3noch/nix-bundle-exe"; flake = false; }; }; - outputs = { self, hs-nix-infra, flake-utils }: + outputs = inputs@{ self, hs-nix-infra, flake-utils, ...}: flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ] (system: @@ -53,6 +54,10 @@ packages.default = flake.packages."pact:exe:pact"; packages.recursive = with hs-nix-infra.lib.recursive system; wrapRecursiveWithMeta "pact" "${wrapFlake self}.default"; + + packages.pact-binary-bundle = pkgs.callPackage inputs.nix-bundle-exe {} + packages.default; + packages.docs = pkgs.stdenv.mkDerivation { name = "pact-docs"; src = ./docs;