mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +00:00
46 lines
1000 B
Nix
46 lines
1000 B
Nix
{ 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
|