fix: npm published version not running

This commit is contained in:
klarkc 2024-07-11 14:53:46 -03:00
parent ddaad01eed
commit 3f1a295673
No known key found for this signature in database
GPG Key ID: A9688C165077FB02
2 changed files with 10 additions and 3 deletions

View File

@ -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 }}

View File

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