languagetool: add preInstall and postInstall runhooks

This commit is contained in:
Robbert Gurdeep Singh 2021-04-25 17:01:20 +02:00
parent 024b4917eb
commit ed85d8cdfb

View file

@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
buildInputs = [ jre ]; buildInputs = [ jre ];
installPhase = '' installPhase = ''
runHook preInstall
mkdir -p $out/share mkdir -p $out/share
mv -- * $out/share/ mv -- * $out/share/
@ -22,6 +24,8 @@ stdenv.mkDerivation rec {
makeWrapper ${jre}/bin/java $out/bin/languagetool-http-server \ makeWrapper ${jre}/bin/java $out/bin/languagetool-http-server \
--add-flags "-cp $out/share/languagetool-server.jar org.languagetool.server.HTTPServer" --add-flags "-cp $out/share/languagetool-server.jar org.languagetool.server.HTTPServer"
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {