From 9a1efbe6f1eeeac4498af279fbd2a600b42a657a Mon Sep 17 00:00:00 2001 From: Matt Gabrenya Date: Sun, 8 Oct 2023 18:51:23 -0700 Subject: [PATCH] build: add nix flake & nix install step --- .github/workflows/build-release.yml | 3 +++ flake.nix | 36 +++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 flake.nix diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 7383717..d5664fc 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -18,6 +18,9 @@ jobs: with: repository: holochain/holochain ref: ${{ github.event.client_payload.ref }} + - uses: cachix/install-nix-action@v22 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} - name: "Build" env: system: ${{ matrix.platform.system }} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..15efb45 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "Template for Holochain app development"; + + inputs = { + versions.url = "github:holochain/holochain?dir=versions/0_2"; + + holochain-flake.url = "github:holochain/holochain"; + holochain-flake.inputs.versions.follows = "versions"; + + nixpkgs.follows = "holochain-flake/nixpkgs"; + flake-parts.follows = "holochain-flake/flake-parts"; + }; + + outputs = inputs: + inputs.flake-parts.lib.mkFlake + { + inherit inputs; + } + { + systems = builtins.attrNames inputs.holochain-flake.devShells; + perSystem = + { inputs' + , config + , pkgs + , system + , ... + }: { + devShells.default = pkgs.mkShell { + inputsFrom = [ inputs'.holochain-flake.devShells.holonix ]; + packages = [ + pkgs.nodejs-18_x + ]; + }; + }; + }; +} \ No newline at end of file