diff --git a/pkgs/tools/text/languagetool/default.nix b/pkgs/tools/text/languagetool/default.nix index 4f3f8af3256..6fcfd6fff85 100644 --- a/pkgs/tools/text/languagetool/default.nix +++ b/pkgs/tools/text/languagetool/default.nix @@ -1,30 +1,27 @@ -{ stdenv, lib, fetchurl, unzip, jdk }: +{ stdenv, fetchzip, jre, makeWrapper }: stdenv.mkDerivation rec { - pname = "LanguageTool"; - version = "3.7"; - name = pname + "-" + version; - src = fetchurl { + name = "LanguageTool-${version}"; + version = "3.9"; + + src = fetchzip { url = "https://www.languagetool.org/download/${name}.zip"; - sha256 = "04i49z022k3nyyr8hnlxima9k5id8qvh2nr3dv8zgcqm5sin6xx9"; + sha256 = "0hqb4hbl7iryw1xk8q1i606azzgzdr17sy6xfr1zpas4r2pnvhfq"; }; - buildInputs = [ unzip jdk ]; - installPhase = - '' - mkdir -p $out/{bin,share} - mv * $out/share/. + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ jre ]; + + installPhase = '' + mkdir -p $out/share + mv * $out/share/ + for lt in languagetool{,-commandline,-server};do - cat > $out/bin/$lt < $out/bin/languagetool-http-server <