summary refs log tree commit diff
path: root/pkgs/applications/editors/vscode/extensions/rescript/rescript-editor-analysis.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/editors/vscode/extensions/rescript/rescript-editor-analysis.nix')
-rw-r--r--pkgs/applications/editors/vscode/extensions/rescript/rescript-editor-analysis.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/applications/editors/vscode/extensions/rescript/rescript-editor-analysis.nix b/pkgs/applications/editors/vscode/extensions/rescript/rescript-editor-analysis.nix
new file mode 100644
index 00000000000..518280b4b06
--- /dev/null
+++ b/pkgs/applications/editors/vscode/extensions/rescript/rescript-editor-analysis.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, bash, ocaml }:
+
+stdenv.mkDerivation {
+  pname = "rescript-editor-analysis";
+  version = "1.1.3";
+
+  src = fetchFromGitHub {
+    owner = "rescript-lang";
+    repo = "rescript-vscode";
+    rev = "8d0412a72307b220b7f5774e2612760a2d429059";
+    sha256 = "rHQtfuIiEWlSPuZvNpEafsvlXCj2Uv1YRR1IfvKfC2s=";
+  };
+
+  nativeBuildInputs = [ ocaml ];
+
+  postPatch = ''
+    cd analysis
+    substituteInPlace Makefile --replace "/bin/bash" "${bash}/bin/bash"
+  '';
+
+  installPhase = ''
+    install -D -m0555 rescript-editor-analysis.exe $out/bin/rescript-editor-analysis.exe
+  '';
+
+  meta = with lib; {
+    description = "Analysis binary for the ReScript VSCode plugin";
+    homepage = "https://github.com/rescript-lang/rescript-vscode";
+    maintainers = with maintainers; [ dlip ];
+    license = licenses.mit;
+  };
+}