From b815ae1a0b3694ba964f7ce0e6b433561d0aabed Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Tue, 21 Nov 2017 12:01:41 +0000 Subject: [PATCH] LanguageTool: 3.7 -> 3.9 --- pkgs/tools/text/languagetool/default.nix | 41 +++++++++++------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/pkgs/tools/text/languagetool/default.nix b/pkgs/tools/text/languagetool/default.nix index 4f3f8af3256d..6fcfd6fff85f 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 <