nixpkgs/pkgs/tools/text/languagetool/default.nix

37 lines
1 KiB
Nix
Raw Normal View History

2017-11-21 13:01:41 +01:00
{ stdenv, fetchzip, jre, makeWrapper }:
2016-10-05 15:05:27 +02:00
stdenv.mkDerivation rec {
2017-11-21 13:01:41 +01:00
name = "LanguageTool-${version}";
version = "4.1";
2017-11-21 13:01:41 +01:00
src = fetchzip {
2016-10-05 15:05:27 +02:00
url = "https://www.languagetool.org/download/${name}.zip";
sha256 = "0qc4z5rl9239lqfi2jrggzmjkx4f33n0arlqm5xgfaqgi8wypz0l";
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; {
homepage = https://languagetool.org;
2016-10-05 17:04:50 +02:00
license = licenses.lgpl21Plus;
maintainers = with maintainers; [
edwtjo
jgeerds
];
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
};
}