blob: 0eebd7f23e179dd78821d61a7153168c3b4cae7c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{ 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 = fileset.toSource {
root = ./.;
fileset = fileset.unions [
./package.json
./package-lock.json
./.gitignore
];
};
dontNpmBuild = true;
npmDeps = fetchNpmDeps {
src = fileset.toSource {
root = ./.;
fileset = fileset.unions [
./package-lock.json
./package.json
];
};
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
|