blob: 9a00fb31cd41e8d28c04731fb16d553e53106d31 (
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
|
{
lib,
stdenv,
fetchFromGitHub,
bash,
ocaml,
ocamlPackages,
dune_3,
version,
}:
stdenv.mkDerivation {
pname = "rescript-editor-analysis";
inherit version;
src = fetchFromGitHub {
owner = "rescript-lang";
repo = "rescript-vscode";
rev = version;
hash = "sha256-+Ht8qWwxtFWHFMiV/aoZIs2S3SxkOWgdwSKN+akp/LU=";
};
nativeBuildInputs = [
ocaml
dune_3
ocamlPackages.cppo
];
# Skip testing phases because they need to download and install node modules
postPatch = ''
cd analysis
substituteInPlace Makefile \
--replace "build: build-analysis-binary build-reanalyze build-tests" "build: build-analysis-binary" \
--replace "test: test-analysis-binary test-reanalyze" "test: test-analysis-binary"
'';
installPhase = ''
install -D -m0555 rescript-editor-analysis.exe $out/bin/rescript-editor-analysis.exe
'';
meta = {
description = "Analysis binary for the ReScript VSCode plugin";
homepage = "https://github.com/rescript-lang/rescript-vscode";
maintainers = [
lib.maintainers.dlip
lib.maintainers.jayesh-bhoot
];
license = lib.licenses.mit;
};
}
|