Compile LibreOffice with GTK4 support
Some checks failed
Check flake / build-amd64-linux (push) Failing after 2m47s

This commit is contained in:
Jordan Holt 2024-06-23 01:14:21 +01:00
parent 2384fc9224
commit b8279e44e6
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520

View File

@ -1,6 +1,24 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let cfg = config.modules.desktop.office.libreoffice; let
cfg = config.modules.desktop.office.libreoffice;
libreoffice-gtk4 = pkgs.libreoffice.override {
extraMakeWrapperArgs = [
"--set SAL_USE_VCLPLUGIN gtk4"
];
unwrapped = pkgs.libreoffice-unwrapped.overrideAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [
pkgs.gtk4
];
configureFlags = oldAttrs.configureFlags ++ [
"--disable-werror"
"--enable-gtk4"
];
passthru = oldAttrs.passthru // {
inherit (pkgs) gtk4;
};
});
};
in { in {
options.modules.desktop.office.libreoffice = { options.modules.desktop.office.libreoffice = {
enable = lib.mkOption { enable = lib.mkOption {
@ -11,7 +29,7 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
user.packages = with pkgs; [ user.packages = with pkgs; [
(if config.modules.desktop.kde.enable == true then libreoffice-qt else libreoffice) (if config.modules.desktop.kde.enable == true then libreoffice-qt else libreoffice-gtk4)
hunspell hunspell
hunspellDicts.en-gb-large hunspellDicts.en-gb-large
hunspellDicts.en-us-large hunspellDicts.en-us-large