From b72604776ed536ee07c56916008afc964af7aa86 Mon Sep 17 00:00:00 2001 From: klarkc Date: Thu, 11 Jul 2024 14:53:46 -0300 Subject: [PATCH] Fix npm version not running --- .github/workflows/release.yml | 4 ++-- flake.nix | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b75fca..e58510b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,9 +25,9 @@ jobs: name: klarkc authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - run: | - nix build + nix build .#npm mkdir -p dist - cp result/bin/purs-eval dist + cp result dist/purs-eval if: ${{ steps.release.outputs.release_created }} - uses: actions/setup-node@v4 if: ${{ steps.release.outputs.release_created }} diff --git a/flake.nix b/flake.nix index ff8796f..f2f6160 100644 --- a/flake.nix +++ b/flake.nix @@ -71,9 +71,16 @@ }; packages = - with ps; { default = app { inherit name; }; + # npm version does not publish a nix-store path + npm = pkgs.runCommand + "purs-eval-npm" + {} + '' + echo "#!/usr/bin/env node" > $out + tail -n +2 ${packages.default}/bin/purs-eval >> $out + ''; }; checks.test = test.check { };