nixpkgs/pkgs/tools/text/languagetool/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

42 lines
1.2 KiB
Nix

{ lib, stdenv, fetchzip, jre, makeWrapper, nixosTests }:
stdenv.mkDerivation rec {
pname = "LanguageTool";
version = "6.4";
src = fetchzip {
url = "https://www.languagetool.org/download/${pname}-${version}.zip";
sha256 = "sha256-MIP7+K3kmzrqXWcR23Rn+gMYR0zrGnnCYGhv81P2Pc4=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
runHook preInstall
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"
runHook postInstall
'';
passthru.tests.languagetool = nixosTests.languagetool;
meta = with lib; {
homepage = "https://languagetool.org";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ edwtjo ];
platforms = jre.meta.platforms;
description = "Proofreading program for English, French German, Polish, and more";
};
}