libreoffice: add withJava option

Changed files
+15 -7
pkgs
applications
office
libreoffice
+15 -7
pkgs/applications/office/libreoffice/default.nix
···
],
withFonts ? false,
withHelp ? true,
+
withJava ? true,
kdeIntegration ? false,
variant ? "fresh",
debugLogging ? variant == "still",
···
'';
nativeBuildInputs = [
-
ant
autoconf
automake
bison
···
gettext
gperf
icu
-
jdk21
libmysqlclient
libtool
libxml2
···
]
++ optionals kdeIntegration [
qt6.qtbase
+
]
+
++ optionals withJava [
+
ant
+
jdk21
];
buildInputs =
···
(harfbuzz.override { withIcu = true; })
hunspell
icu
-
jre'
lcms2
libGL
libGLU
···
qt6.qtbase
kdePackages.kcoreaddons
kdePackages.kio
+
]
+
++ optionals withJava [
+
jre'
];
preConfigure = ''
···
"--without-buildconfig-recorded"
(lib.withFeature withHelp "help")
-
"--with-beanshell-jar=${bsh}"
"--with-vendor=NixOS"
"--disable-report-builder"
"--disable-online-update"
···
"--enable-dbus"
"--enable-release-build"
"--enable-epm"
-
"--with-ant-home=${ant.home}"
+
(lib.withFeature withJava "java")
# Without these, configure does not finish
"--without-junit"
···
(lib.withFeature withFonts "fonts")
"--without-doxygen"
-
"--with-system-beanshell"
"--with-system-cairo"
"--with-system-coinmp"
"--with-system-headers"
···
"--enable-kf6"
"--enable-qt6"
]
+
++ optionals withJava [
+
"--with-system-beanshell"
+
"--with-ant-home=${ant.home}"
+
"--with-beanshell-jar=${bsh}"
+
]
++ (
if variant == "fresh" || variant == "collabora" then
[
···
passthru = {
inherit srcs;
-
jdk = jre';
+
jdk = if withJava then jre' else null;
python = python311; # for unoconv
updateScript = [
./update.sh