summary refs log tree commit diff
path: root/pkgs/applications/office
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2023-09-29 18:26:05 +0300
committerDoron Behar <doron.behar@gmail.com>2023-10-04 05:45:25 +0300
commit159b8a6eb2f345d85de99b9ec5ffca538ae49e57 (patch)
treeed9aa626969eecc6976a44372fe3fc5e111b20c6 /pkgs/applications/office
parenteb6574af29fb79bb4663abf011316019da9c2efd (diff)
downloadnixpkgs-159b8a6eb2f345d85de99b9ec5ffca538ae49e57.tar
nixpkgs-159b8a6eb2f345d85de99b9ec5ffca538ae49e57.tar.gz
nixpkgs-159b8a6eb2f345d85de99b9ec5ffca538ae49e57.tar.bz2
nixpkgs-159b8a6eb2f345d85de99b9ec5ffca538ae49e57.tar.lz
nixpkgs-159b8a6eb2f345d85de99b9ec5ffca538ae49e57.tar.xz
nixpkgs-159b8a6eb2f345d85de99b9ec5ffca538ae49e57.tar.zst
nixpkgs-159b8a6eb2f345d85de99b9ec5ffca538ae49e57.zip
libreoffice: reformat a bit kdeIntegration postPatch hook
Put the xdg-open -> kde-open5 substitution in the kdeIntegration
conditioned block, also put the comment about it from above the
postPatch near there.
Diffstat (limited to 'pkgs/applications/office')
-rw-r--r--pkgs/applications/office/libreoffice/default.nix33
1 files changed, 15 insertions, 18 deletions
diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix
index a64d02aad0f..051125cd5c3 100644
--- a/pkgs/applications/office/libreoffice/default.nix
+++ b/pkgs/applications/office/libreoffice/default.nix
@@ -229,25 +229,7 @@ in stdenv.mkDerivation (finalAttrs: {
       (x: lib.optional (x?dev) x.dev)
       finalAttrs.buildInputs);
 
-  ### QT/KDE
-  #
-  # configure.ac assumes that the first directory that contains headers and
-  # libraries during its checks contains *all* the relevant headers/libs which
-  # obviously doesn't work for us, so we have 2 options:
-  #
-  # 1. patch configure.ac in order to specify the direct paths to various Qt/KDE
-  # dependencies which is ugly and brittle, or
-  #
-  # 2. use symlinkJoin to pull in the relevant dependencies and just patch in
-  # that path which is *also* ugly, but far less likely to break
-  #
-  # The 2nd option is not very Nix'y, but I'll take robust over nice any day.
-  # Additionally, it's much easier to fix if LO breaks on the next upgrade (just
-  # add the missing dependencies to it).
   postPatch = ''
-    substituteInPlace shell/source/unix/exec/shellexec.cxx \
-      --replace xdg-open ${if kdeIntegration then "kde-open5" else "xdg-open"}
-
     # configure checks for header 'gpgme++/gpgmepp_version.h',
     # and if it is found (no matter where) uses a hardcoded path
     # in what presumably is an effort to make it possible to write
@@ -258,6 +240,21 @@ in stdenv.mkDerivation (finalAttrs: {
       'GPGMEPP_CFLAGS=-I/usr/include/gpgme++' \
       'GPGMEPP_CFLAGS=-I${gpgme.dev}/include/gpgme++'
   '' + optionalString kdeIntegration ''
+    substituteInPlace shell/source/unix/exec/shellexec.cxx \
+      --replace xdg-open kde-open5
+    # configure.ac assumes that the first directory that contains headers and
+    # libraries during its checks contains *all* the relevant headers/libs which
+    # obviously doesn't work for us, so we have 2 options:
+    #
+    # 1. patch configure.ac in order to specify the direct paths to various Qt/KDE
+    # dependencies which is ugly and brittle, or
+    #
+    # 2. use symlinkJoin to pull in the relevant dependencies and just patch in
+    # that path which is *also* ugly, but far less likely to break
+    #
+    # The 2nd option is not very Nix'y, but I'll take robust over nice any day.
+    # Additionally, it's much easier to fix if LO breaks on the next upgrade (just
+    # add the missing dependencies to it).
     substituteInPlace configure.ac \
       --replace '$QT5INC ' '$QT5INC ${kdeDeps}/include ' \
       --replace '$QT5LIB ' '$QT5LIB ${kdeDeps}/lib ' \