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 { };