2017-11-21 13:01:41 +01:00
|
|
|
{ stdenv, fetchzip, jre, makeWrapper }:
|
2016-10-05 15:05:27 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "LanguageTool";
|
2020-07-01 09:05:09 +02:00
|
|
|
version = "5.0";
|
2017-11-21 13:01:41 +01:00
|
|
|
|
|
|
|
src = fetchzip {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://www.languagetool.org/download/${pname}-${version}.zip";
|
2020-07-01 09:05:09 +02:00
|
|
|
sha256 = "1jyd4z62ldwhqx9r7v4b9k4pl300wr4b7ggj4f0yjf0gpwg7l9p7";
|
2016-10-05 15:05:27 +02:00
|
|
|
};
|
2017-11-21 13:01:41 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share
|
|
|
|
mv * $out/share/
|
|
|
|
|
2016-10-05 15:05:27 +02:00
|
|
|
for lt in languagetool{,-commandline,-server};do
|
2017-11-21 13:01:41 +01:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/$lt \
|
|
|
|
--add-flags "-cp $out/share/ -jar $out/share/$lt.jar"
|
2016-10-05 15:05:27 +02:00
|
|
|
done
|
2017-11-21 13:01:41 +01: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 15:05:27 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-03-27 05:20:20 +01:00
|
|
|
homepage = "https://languagetool.org";
|
2016-10-05 17:04:50 +02:00
|
|
|
license = licenses.lgpl21Plus;
|
2016-12-15 22:18:29 +01:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
edwtjo
|
|
|
|
];
|
2017-11-21 13:01:41 +01:00
|
|
|
description = "A proofreading program for English, French German, Polish, and more";
|
2016-10-05 15:05:27 +02:00
|
|
|
};
|
|
|
|
}
|