about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2022-06-07 04:20:00 +0000
committerMario Rodas <marsam@users.noreply.github.com>2022-06-07 04:20:00 +0000
commit8abfb3fbc60046ab98e8c164991d85d429eb39e4 (patch)
tree174b26e62f15742655e7088a0132d14fb84140dd /pkgs/tools
parent4c25d8175830140acbf52901b98ff29d91372029 (diff)
ltex-ls: init at 15.2.0
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/text/ltex-ls/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/tools/text/ltex-ls/default.nix b/pkgs/tools/text/ltex-ls/default.nix
new file mode 100644
index 0000000000000..c21ab2e038ab6
--- /dev/null
+++ b/pkgs/tools/text/ltex-ls/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, makeBinaryWrapper, jre_headless }:
+
+stdenv.mkDerivation rec {
+  pname = "ltex-ls";
+  version = "15.2.0";
+
+  src = fetchurl {
+    url = "https://github.com/valentjn/ltex-ls/releases/download/${version}/ltex-ls-${version}.tar.gz";
+    sha256 = "sha256-ygjCFjYaP9Lc5BLuOHe5+lyaKpfDhicR783skkBgo7I=";
+  };
+
+  nativeBuildInputs = [ makeBinaryWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    cp -rfv bin/ lib/ $out
+    rm -fv $out/bin/*.bat
+    for file in $out/bin/{ltex-ls,ltex-cli}; do
+      wrapProgram $file --set JAVA_HOME "${jre_headless}"
+    done
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://valentjn.github.io/ltex/";
+    description = "LSP language server for LanguageTool";
+    license = licenses.mpl20;
+    maintainers = [ maintainers.marsam ];
+    platforms = jre_headless.meta.platforms;
+  };
+}