Merge pull request #31893 from Mic92/language-tool

LanguageTool: 3.7 -> 3.9
This commit is contained in:
Jörg Thalheim 2017-11-21 12:55:42 +00:00 committed by GitHub
commit b632fb9eb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,30 +1,27 @@
{ stdenv, lib, fetchurl, unzip, jdk }: { stdenv, fetchzip, jre, makeWrapper }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "LanguageTool"; name = "LanguageTool-${version}";
version = "3.7"; version = "3.9";
name = pname + "-" + version;
src = fetchurl { src = fetchzip {
url = "https://www.languagetool.org/download/${name}.zip"; url = "https://www.languagetool.org/download/${name}.zip";
sha256 = "04i49z022k3nyyr8hnlxima9k5id8qvh2nr3dv8zgcqm5sin6xx9"; sha256 = "0hqb4hbl7iryw1xk8q1i606azzgzdr17sy6xfr1zpas4r2pnvhfq";
}; };
buildInputs = [ unzip jdk ]; nativeBuildInputs = [ makeWrapper ];
installPhase = buildInputs = [ jre ];
''
mkdir -p $out/{bin,share} installPhase = ''
mv * $out/share/. mkdir -p $out/share
mv * $out/share/
for lt in languagetool{,-commandline,-server};do for lt in languagetool{,-commandline,-server};do
cat > $out/bin/$lt <<EXE makeWrapper ${jre}/bin/java $out/bin/$lt \
#!${stdenv.shell} --add-flags "-cp $out/share/ -jar $out/share/$lt.jar"
${jdk}/bin/java -cp $out/share/ -jar $out/share/$lt.jar "\$@"
EXE
chmod +x $out/bin/$lt
done done
cat > $out/bin/languagetool-http-server <<EXE
#!${stdenv.shell} makeWrapper ${jre}/bin/java $out/bin/languagetool-http-server \
${jdk}/bin/java -cp $out/share/languagetool-server.jar org.languagetool.server.HTTPServer "\$@" --add-flags "-cp $out/share/languagetool-server.jar org.languagetool.server.HTTPServer"
EXE
chmod +x $out/bin/languagetool-http-server
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
@ -34,6 +31,6 @@ stdenv.mkDerivation rec {
edwtjo edwtjo
jgeerds jgeerds
]; ];
descrption = "A proofreading program for English, French German, Polish, and more"; description = "A proofreading program for English, French German, Polish, and more";
}; };
} }