2016-10-05 14:05:27 +01:00
|
|
|
{ stdenv, lib, fetchurl, unzip, jdk }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "LanguageTool";
|
2017-05-07 21:27:45 +01:00
|
|
|
version = "3.7";
|
2016-10-05 14:05:27 +01:00
|
|
|
name = pname + "-" + version;
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.languagetool.org/download/${name}.zip";
|
2017-05-07 21:27:45 +01:00
|
|
|
sha256 = "04i49z022k3nyyr8hnlxima9k5id8qvh2nr3dv8zgcqm5sin6xx9";
|
2016-10-05 14:05:27 +01:00
|
|
|
};
|
|
|
|
buildInputs = [ unzip jdk ];
|
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
mkdir -p $out/{bin,share}
|
|
|
|
mv * $out/share/.
|
|
|
|
for lt in languagetool{,-commandline,-server};do
|
|
|
|
cat > $out/bin/$lt <<EXE
|
|
|
|
#!${stdenv.shell}
|
2017-06-17 18:42:51 +01:00
|
|
|
${jdk}/bin/java -cp $out/share/ -jar $out/share/$lt.jar "\$@"
|
2016-10-05 14:05:27 +01:00
|
|
|
EXE
|
|
|
|
chmod +x $out/bin/$lt
|
|
|
|
done
|
2017-10-31 15:05:41 +00:00
|
|
|
cat > $out/bin/languagetool-http-server <<EXE
|
|
|
|
#!${stdenv.shell}
|
|
|
|
${jdk}/bin/java -cp $out/share/languagetool-server.jar org.languagetool.server.HTTPServer "\$@"
|
|
|
|
EXE
|
|
|
|
chmod +x $out/bin/languagetool-http-server
|
2016-10-05 14:05:27 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://languagetool.org;
|
2016-10-05 16:04:50 +01:00
|
|
|
license = licenses.lgpl21Plus;
|
2016-12-15 21:18:29 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
edwtjo
|
|
|
|
jgeerds
|
|
|
|
];
|
2016-10-05 14:05:27 +01:00
|
|
|
descrption = "A proofreading program for English, French German, Polish, and more";
|
|
|
|
};
|
|
|
|
}
|