Skip to content

Commit

Permalink
Merge pull request #51933 from hedning/fix-nautilus-thumbnails
Browse files Browse the repository at this point in the history
gnome3.nautilus: fix thumbnail generation
  • Loading branch information
hedning authored Dec 13, 2018
2 parents 562b7a7 + 4d0a88b commit 2727774
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
19 changes: 19 additions & 0 deletions pkgs/desktops/gnome-3/core/nautilus/bubblewrap-paths.patch
Original file line number Diff line number Diff line change
@@ -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",
27 changes: 21 additions & 6 deletions pkgs/desktops/gnome-3/core/nautilus/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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
];

Expand All @@ -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 {
Expand Down

0 comments on commit 2727774

Please sign in to comment.