about summary refs log tree commit diff
path: root/pkgs/applications/office/libreoffice
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/office/libreoffice')
-rw-r--r--pkgs/applications/office/libreoffice/default.nix17
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix
index d679b168e24ff..b48bd3347eada 100644
--- a/pkgs/applications/office/libreoffice/default.nix
+++ b/pkgs/applications/office/libreoffice/default.nix
@@ -1,8 +1,9 @@
 { stdenv
 , fetchurl
+, fetchpatch2
 , lib
 , pam
-, python3
+, python311
 , libxslt
 , perl
 , perlPackages
@@ -86,7 +87,7 @@
 , glm
 , gst_all_1
 , gdb
-, gnome
+, adwaita-icon-theme
 , glib
 , ncurses
 , libepoxy
@@ -244,6 +245,11 @@ in stdenv.mkDerivation (finalAttrs: {
     # - the remaining tests have notes in the patch
     # FIXME: get rid of this ASAP
     ./skip-broken-tests.patch
+    (fetchpatch2 {
+      name = "icu74-compat.patch";
+      url = "https://gitlab.archlinux.org/archlinux/packaging/packages/libreoffice-fresh/-/raw/main/libreoffice-7.5.8.2-icu-74-compatibility.patch?ref_type=heads.patch";
+      hash = "sha256-OGBPIVQj8JTYlkKywt4QpH7ULAzKmet5jTLztGpIS0Y=";
+    })
   ] ++ lib.optionals (variant == "still") [
     # Remove build config to reduce the amount of `-dev` outputs in the
     # runtime closure. This behavior was introduced by upstream in commit
@@ -268,6 +274,9 @@ in stdenv.mkDerivation (finalAttrs: {
     substituteInPlace configure.ac --replace-fail \
       'GPGMEPP_CFLAGS=-I/usr/include/gpgme++' \
       'GPGMEPP_CFLAGS=-I${gpgme.dev}/include/gpgme++'
+
+    # Fix for Python 3.12
+    substituteInPlace configure.ac --replace-fail distutils.sysconfig sysconfig
   '';
 
   nativeBuildInputs = [
@@ -311,7 +320,7 @@ in stdenv.mkDerivation (finalAttrs: {
     gettext
     glib
     glm
-    gnome.adwaita-icon-theme
+    adwaita-icon-theme
     gperf
     gpgme
     graphite2
@@ -372,7 +381,7 @@ in stdenv.mkDerivation (finalAttrs: {
     perl
     poppler
     postgresql
-    python3
+    python311
     sane-backends
     unixODBC
     unzip