summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2017-06-17 19:13:27 +0200
committerGitHub <noreply@github.com>2017-06-17 19:13:27 +0200
commitfd92d817a33c24041feba3df3c11dbc987b4f331 (patch)
tree0755ad443fb22d89e1cc0bf9173282d3c4bf1577 /pkgs
parent4e8d44c2cdaccc030bd30b3dd8b78eea68391fb5 (diff)
parent16118fede571909dd0c986d0c5a713fde88c9ecd (diff)
downloadnixlib-fd92d817a33c24041feba3df3c11dbc987b4f331.tar
nixlib-fd92d817a33c24041feba3df3c11dbc987b4f331.tar.gz
nixlib-fd92d817a33c24041feba3df3c11dbc987b4f331.tar.bz2
nixlib-fd92d817a33c24041feba3df3c11dbc987b4f331.tar.lz
nixlib-fd92d817a33c24041feba3df3c11dbc987b4f331.tar.xz
nixlib-fd92d817a33c24041feba3df3c11dbc987b4f331.tar.zst
nixlib-fd92d817a33c24041feba3df3c11dbc987b4f331.zip
Merge pull request #26670 from lverns/libreoffice-fix-xdg
libreoffice: fix #25831
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/office/libreoffice/default.nix2
-rw-r--r--pkgs/applications/office/libreoffice/still.nix13
-rw-r--r--pkgs/applications/office/libreoffice/xdg-open.patch25
3 files changed, 35 insertions, 5 deletions
diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix
index ee59f0d078d4..0f5f59209660 100644
--- a/pkgs/applications/office/libreoffice/default.nix
+++ b/pkgs/applications/office/libreoffice/default.nix
@@ -72,6 +72,8 @@ in stdenv.mkDerivation rec {
   configureScript = "./autogen.sh";
   dontUseCmakeConfigure = true;
 
+  patches = [ ./xdg-open.patch ];
+
   postUnpack = ''
     mkdir -v $sourceRoot/src
   '' + (stdenv.lib.concatMapStrings (f: "ln -sfv ${f} $sourceRoot/src/${f.md5 or f.outputHash}-${f.name}\nln -sfv ${f} $sourceRoot/src/${f.name}\n") srcs.third_party)
diff --git a/pkgs/applications/office/libreoffice/still.nix b/pkgs/applications/office/libreoffice/still.nix
index 7a2174b557e1..7c122c0725af 100644
--- a/pkgs/applications/office/libreoffice/still.nix
+++ b/pkgs/applications/office/libreoffice/still.nix
@@ -73,11 +73,14 @@ in stdenv.mkDerivation rec {
   dontUseCmakeConfigure = true;
 
   # ICU 58, included in 5.3.x
-  patches = [(fetchurl {
-    url = "https://gerrit.libreoffice.org/gitweb?p=core.git;a=patch;h=3e42714c76b1347babfdea0564009d8d82a83af4";
-    sha256 = "10bid0jdw1rpdsqwzzk3r4rp6bjs2cvi82h7anz2m1amfjdv86my";
-    name = "libreoffice-5.2.x-icu4c-58.patch";
-  })];
+  patches = [
+    (fetchurl {
+      url = "https://gerrit.libreoffice.org/gitweb?p=core.git;a=patch;h=3e42714c76b1347babfdea0564009d8d82a83af4";
+      sha256 = "10bid0jdw1rpdsqwzzk3r4rp6bjs2cvi82h7anz2m1amfjdv86my";
+      name = "libreoffice-5.2.x-icu4c-58.patch";}
+    )
+    ./xdg-open.patch
+  ];
 
   postUnpack = ''
     mkdir -v $sourceRoot/src
diff --git a/pkgs/applications/office/libreoffice/xdg-open.patch b/pkgs/applications/office/libreoffice/xdg-open.patch
new file mode 100644
index 000000000000..3ff7e5d80f7a
--- /dev/null
+++ b/pkgs/applications/office/libreoffice/xdg-open.patch
@@ -0,0 +1,25 @@
+diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
+--- a/shell/source/unix/exec/shellexec.cxx
++++ b/shell/source/unix/exec/shellexec.cxx
+@@ -150,7 +150,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
+         if (std::getenv("LIBO_FLATPAK") != nullptr) {
+             aBuffer.append("/app/bin/xdg-open");
+         } else {
+-            aBuffer.append("/usr/bin/xdg-open");
++            aBuffer.append("xdg-open");
+         }
+ #endif
+         aBuffer.append(" ");
+diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh
+index 4519e01f26e2..8985711a2c01 100755
+--- a/shell/source/unix/misc/senddoc.sh
++++ b/shell/source/unix/misc/senddoc.sh
+@@ -393,6 +393,8 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
+             MAILER=/usr/bin/kde-open
+         elif [ -x /usr/bin/xdg-open ] ; then
+             MAILER=/usr/bin/xdg-open
++        elif type -p xdg-open >/dev/null 2>&1 ; then
++            MAILER="$(type -p xdg-open)"
+         else
+             echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`"
+             exit 2