purescm: init at 1.8.2

This commit is contained in:
toastal 2024-02-15 11:27:54 +07:00
parent fa83add1b9
commit e1c2599321
5 changed files with 90 additions and 0 deletions

1
pkgs/by-name/pu/purescm/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules/

View file

@ -0,0 +1,19 @@
========================================================================
purescm
========================================================================
Suggested additional ``buildInputs``
====================================
``chez-racket``
Upstream is using the Racket fork of Chez Scheme to execute the
generated Scheme output.
To update this package
======================
#. Bump the ``./package.json`` version pin
#. Run ``nix-shell -p nodejs --command "npm i --package-lock-only"``
#. Update ``npmDeps.hash`` in the ``package.nix``

View file

@ -0,0 +1,20 @@
{
"name": "purescm",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"purescm": "1.8.2"
}
},
"node_modules/purescm": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/purescm/-/purescm-1.8.2.tgz",
"integrity": "sha512-r+iaiRagOO2rHxGIke391l+pMlpE85vOVpQA32pdftJTdKeUVGIYy0UAs1nOkQSNxdHMXsNIkrskAwOSiyX3PA==",
"bin": {
"purescm": "index.js"
}
}
}
}

View file

@ -0,0 +1,5 @@
{
"dependencies": {
"purescm": "1.8.2"
}
}

View file

@ -0,0 +1,45 @@
{ lib
, buildNpmPackage
, fetchNpmDeps
, testers
}:
let
inherit (lib) fileset;
packageLock = builtins.fromJSON (builtins.readFile ./package-lock.json);
pname = "purescm";
version = packageLock.packages."node_modules/${pname}".version;
package = buildNpmPackage {
inherit pname version;
src = ./.;
dontNpmBuild = true;
npmDeps = fetchNpmDeps {
src = ./.;
hash = "sha256-ljeFcLvIET77Q0OR6O5Ok1fGnaxaKaoywpcy2aHq/6o=";
};
installPhase = ''
mkdir -p $out/share/${pname}
cp -r node_modules/ $out/share/${pname}
ln -s $out/share/${pname}/node_modules/.bin $out/bin
'';
passthru.tests = {
version = testers.testVersion { inherit package; };
};
meta = {
description = "Chez Scheme back-end for PureScript";
homepage = "https://github.com/purescm/purescm";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ toastal ];
mainProgram = "purescm";
};
};
in
package