nixpkgs/pkgs/applications/editors/vscode/extensions/chenglou92.rescript-vscode/rescript-editor-analysis.nix
Jayesh Bhoot 97fab1a38c
chenglou92.rescript-vscode: 1.8.1 -> 1.16.0 (#231648)
Co-authored-by: Jayesh Bhoot <jayesh@bhoot.sh>
2023-05-15 17:04:46 +02:00

35 lines
1.1 KiB
Nix

{ 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;
sha256 = "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;
};
}