summary refs log tree commit diff
path: root/pkgs/desktops
diff options
context:
space:
mode:
authorTor Hedin Brønner <torhedinbronner@gmail.com>2018-12-13 14:34:12 +0100
committerGitHub <noreply@github.com>2018-12-13 14:34:12 +0100
commit2727774ce1e3a9864f467bc2872fd09ba0f61e47 (patch)
treefafca569c6ff9128855e9b6d8c6e1acc4cc0cb45 /pkgs/desktops
parent562b7a7702cf502fa9ac57a888aadf2c55275379 (diff)
parent4d0a88b21a0b572cbdd59e6a5a5381d37af6b4ca (diff)
downloadnixpkgs-2727774ce1e3a9864f467bc2872fd09ba0f61e47.tar
nixpkgs-2727774ce1e3a9864f467bc2872fd09ba0f61e47.tar.gz
nixpkgs-2727774ce1e3a9864f467bc2872fd09ba0f61e47.tar.bz2
nixpkgs-2727774ce1e3a9864f467bc2872fd09ba0f61e47.tar.lz
nixpkgs-2727774ce1e3a9864f467bc2872fd09ba0f61e47.tar.xz
nixpkgs-2727774ce1e3a9864f467bc2872fd09ba0f61e47.tar.zst
nixpkgs-2727774ce1e3a9864f467bc2872fd09ba0f61e47.zip
Merge pull request #51933 from hedning/fix-nautilus-thumbnails
gnome3.nautilus: fix thumbnail generation
Diffstat (limited to 'pkgs/desktops')
-rw-r--r--pkgs/desktops/gnome-3/core/nautilus/bubblewrap-paths.patch19
-rw-r--r--pkgs/desktops/gnome-3/core/nautilus/default.nix27
2 files changed, 40 insertions, 6 deletions
diff --git a/pkgs/desktops/gnome-3/core/nautilus/bubblewrap-paths.patch b/pkgs/desktops/gnome-3/core/nautilus/bubblewrap-paths.patch
new file mode 100644
index 00000000000..051b7618612
--- /dev/null
+++ b/pkgs/desktops/gnome-3/core/nautilus/bubblewrap-paths.patch
@@ -0,0 +1,19 @@
+---   a/src/gnome-desktop/gnome-desktop-thumbnail-script.c
++++   a/src/gnome-desktop/gnome-desktop-thumbnail-script.c
+@@ -514,14 +514,10 @@ add_bwrap (GPtrArray   *array,
+   g_return_val_if_fail (script->s_infile != NULL, FALSE);
+ 
+   add_args (array,
+-	    "bwrap",
+-	    "--ro-bind", "/usr", "/usr",
+-	    "--ro-bind", "/lib", "/lib",
+-	    "--ro-bind", "/lib64", "/lib64",
++      "@bubblewrap_bin@",
++      "--ro-bind", "@storeDir@", "@storeDir@",
+ 	    "--proc", "/proc",
+ 	    "--dev", "/dev",
+-	    "--symlink", "usr/bin", "/bin",
+-	    "--symlink", "usr/sbin", "/sbin",
+ 	    "--chdir", "/",
+ 	    "--setenv", "GIO_USE_VFS", "local",
+ 	    "--unshare-all",
diff --git a/pkgs/desktops/gnome-3/core/nautilus/default.nix b/pkgs/desktops/gnome-3/core/nautilus/default.nix
index 7e7c40e8130..b581d8f0983 100644
--- a/pkgs/desktops/gnome-3/core/nautilus/default.nix
+++ b/pkgs/desktops/gnome-3/core/nautilus/default.nix
@@ -1,6 +1,9 @@
-{ stdenv, fetchurl, meson, ninja, pkgconfig, gettext, libxml2, desktop-file-utils, python3, wrapGAppsHook
-, gtk, gnome3, gnome-autoar, glib-networking, shared-mime-info, libnotify, libexif, libseccomp
-, exempi, librsvg, tracker, tracker-miners, gnome-desktop, gexiv2, libselinux, gdk_pixbuf }:
+{ stdenv, fetchurl, meson, ninja, pkgconfig, gettext, libxml2
+, desktop-file-utils, python3, wrapGAppsHook , gtk, gnome3, gnome-autoar
+, glib-networking, shared-mime-info, libnotify, libexif, libseccomp , exempi
+, librsvg, tracker, tracker-miners, gexiv2, libselinux, gdk_pixbuf
+, substituteAll, bubblewrap
+}:
 
 let
   pname = "nautilus";
@@ -13,11 +16,14 @@ in stdenv.mkDerivation rec {
     sha256 = "144r4py9b8w9ycsg6fggjg05kwvymh003qsb3h6apgpch5y3zgnv";
   };
 
-  nativeBuildInputs = [ meson ninja pkgconfig libxml2 gettext python3 wrapGAppsHook desktop-file-utils ];
+  nativeBuildInputs = [
+    meson ninja pkgconfig libxml2 gettext python3 wrapGAppsHook
+    desktop-file-utils
+  ];
 
   buildInputs = [
     glib-networking shared-mime-info libexif gtk exempi libnotify libselinux
-    tracker tracker-miners gnome-desktop gexiv2 libseccomp
+    tracker tracker-miners gexiv2 libseccomp bubblewrap
     gnome3.adwaita-icon-theme gnome3.gsettings-desktop-schemas
   ];
 
@@ -36,7 +42,16 @@ in stdenv.mkDerivation rec {
     patchShebangs build-aux/meson/postinstall.py
   '';
 
-  patches = [ ./extension_dir.patch ];
+  patches = [
+    ./extension_dir.patch
+    # 3.30 now generates it's own thummbnails,
+    # and no longer depends on `gnome-desktop`
+    (substituteAll {
+      src = ./bubblewrap-paths.patch;
+      bubblewrap_bin = "${bubblewrap}/bin/bwrap";
+      inherit (builtins) storeDir;
+    })
+  ];
 
   passthru = {
     updateScript = gnome3.updateScript {