Merge pull request #284235 from toastal/purescm

purescm: init at 1.8.2
This commit is contained in:
adisbladis 2024-02-20 23:00:43 +13:00 committed by GitHub
commit c6aa0f73ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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