2017-11-21 12:01:41 +00:00
|
|
|
{ stdenv, fetchzip, jre, makeWrapper }:
|
2016-10-05 14:05:27 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-11-21 12:01:41 +00:00
|
|
|
name = "LanguageTool-${version}";
|
2018-10-03 17:40:12 +01:00
|
|
|
version = "4.3";
|
2017-11-21 12:01:41 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2016-10-05 14:05:27 +01:00
|
|
|
url = "https://www.languagetool.org/download/${name}.zip";
|
2018-10-03 17:40:12 +01:00
|
|
|
sha256 = "0zsz82jc39j5wjwynmjny7h82kjz7clyk37n6pxmi85ibbdm0zn4";
|
2016-10-05 14:05:27 +01:00
|
|
|
};
|
2017-11-21 12:01:41 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share
|
|
|
|
mv * $out/share/
|
|
|
|
|
2016-10-05 14:05:27 +01:00
|
|
|
for lt in languagetool{,-commandline,-server};do
|
2017-11-21 12:01:41 +00:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/$lt \
|
|
|
|
--add-flags "-cp $out/share/ -jar $out/share/$lt.jar"
|
2016-10-05 14:05:27 +01:00
|
|
|
done
|
2017-11-21 12:01:41 +00:00
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/languagetool-http-server \
|
|
|
|
--add-flags "-cp $out/share/languagetool-server.jar org.languagetool.server.HTTPServer"
|
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
|
|
|
|
];
|
2017-11-21 12:01:41 +00:00
|
|
|
description = "A proofreading program for English, French German, Polish, and more";
|
2016-10-05 14:05:27 +01:00
|
|
|
};
|
|
|
|
}
|