depot/third_party/nixpkgs/pkgs/tools/text/languagetool/default.nix
Default email b6d97fd731 Project import generated by Copybara.
GitOrigin-RevId: be0b453d7c7eee2090962c9a83749b024ff9acf5
2020-12-25 14:55:36 +01:00

36 lines
1 KiB
Nix

{ stdenv, fetchzip, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "LanguageTool";
version = "5.1";
src = fetchzip {
url = "https://www.languagetool.org/download/${pname}-${version}.zip";
sha256 = "07a2cxsa04lzifphlf5mv88xpnixalmryd0blawblxsmdyhmvg3y";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
mkdir -p $out/share
mv * $out/share/
for lt in languagetool{,-commandline,-server};do
makeWrapper ${jre}/bin/java $out/bin/$lt \
--add-flags "-cp $out/share/ -jar $out/share/$lt.jar"
done
makeWrapper ${jre}/bin/java $out/bin/languagetool-http-server \
--add-flags "-cp $out/share/languagetool-server.jar org.languagetool.server.HTTPServer"
'';
meta = with stdenv.lib; {
homepage = "https://languagetool.org";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [
edwtjo
];
platforms = jre.meta.platforms;
description = "A proofreading program for English, French German, Polish, and more";
};
}