I am trying to package the languagetool LibreOffice extension so I can install it declarative, but it looks like LibreOffice is not detecting the extension no matter what I do.
Here is what I have so far:
{ stdenvNoCC
, fetchurl
, lib
, languagetool
, libarchive
}:
stdenvNoCC.mkDerivation rec {
pname = "libreoffice-extension-languagetool";
version = "6.1.1";
src = fetchurl {
url = "https://languagetool.org/download/LanguageTool-${version}.oxt";
hash = "sha256-lCSO+KSHUW8M2gkXvxM2/V/FkJSXYN9ZwljYhlv2cUY=";
};
# Otherwise, will get "do not know how to unpack .oxt"
dontUnpack = true;
# need bsdtar
nativeBuildInputs = [ libarchive ];
buildInputs = [ languagetool ];
installPhase = ''
runHook preInstall
install -d -m755 "$out/lib/libreoffice/share/extensions/languagetool/"
bsdtar -xf $src -C "$out/lib/libreoffice/share/extensions/languagetool/"
runHook postInstall
'';
meta = with lib; {
homepage = "https://extensions.libreoffice.org/en/extensions/show/languagetool";
description = "Style and grammar checker support for Libreoffice";
maintainers = with maintainers; [ anomalocaris ];
platforms = platforms.linux;
};
}
I based my approach on that of the AUR package: AUR (en) - libreoffice-extension-languagetool