~ruther/guix-local

e2ada3bd21935c1ac500618e39c4b65545484464 — Liliana Marie Prikler 1 year, 8 months ago 71d1ea4
gnu: nautilus: Update to 46.2.

* gnu/packages/gnome.scm (nautilus): Update to 46.2.
[#:phases]: Add ‘patch-commands’.
Rename ‘disable-tracker-tests’ to ‘fix-tests’
Also fix “test-directory”.
[inputs]: Add bash-minimal.
* gnu/packages/patches/nautilus-extension-search-path.patch: Rebase patch.

Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2 files changed, 39 insertions(+), 33 deletions(-)

M gnu/packages/gnome.scm
M gnu/packages/patches/nautilus-extension-search-path.patch
M gnu/packages/gnome.scm => gnu/packages/gnome.scm +18 -7
@@ 10003,7 10003,7 @@ shared object databases, search tools and indexing.")
(define-public nautilus
  (package
    (name "nautilus")
    (version "44.3.1")
    (version "46.2")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/" name "/"


@@ 10011,7 10011,7 @@ shared object databases, search tools and indexing.")
                                  name "-" version ".tar.xz"))
              (sha256
               (base32
                "05njbaq98y00n1z1smg1pdip3shr84q8a10wssm8sjbv7sirwj75"))
                "1ykir908hz9b8c2mih15angaiv0dl8r85mhqd5zl9qxr368cks3f"))
              (patches
               (search-patches "nautilus-extension-search-path.patch"))))
    (build-system meson-build-system)


@@ 10020,6 10020,12 @@ shared object databases, search tools and indexing.")
      #:glib-or-gtk? #t
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'patch-commands
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "src/nautilus-autorun-software.c"
                (("g_file_new_for_path \\(\"/bin/sh\");")
                 (format #f "g_file_new_for_path (~s);"
                         (search-input-file inputs "bin/sh"))))))
          (add-after 'unpack 'patch-tracker3-command
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "src/nautilus-tag-manager.c"


@@ 10027,13 10033,17 @@ shared object databases, search tools and indexing.")
                 (string-append "\""
                                (search-input-file inputs "/bin/tracker3")
                                "\"")))))
          (add-after 'unpack 'disable-tracker-tests
            ;; The tracker test hangs in the build container (see:
            ;; https://gitlab.gnome.org/GNOME/nautilus/-/issues/2486).
          (add-after 'unpack 'fix-tests
            (lambda _
              ;; The tracker test hangs in the build container (see:
              ;; https://gitlab.gnome.org/GNOME/nautilus/-/issues/2486).
              (substitute* "test/automated/displayless/meson.build"
                (("^foreach t: tracker_tests" all)
                 (string-append "tracker_tests = []\n" all)))))
                 (string-append "tracker_tests = []\n" all)))
              ;; /etc does not have that many files in our build container.
              (substitute* "test/automated/displayless/test-directory.c"
                (("g_assert_cmpint \\(g_list_length \\(files\\), >, 10\\);")
                 "g_assert_cmpint (g_list_length (files), >, 1);"))))
          (add-after 'unpack 'skip-gtk-update-icon-cache
            ;; Don't create 'icon-theme.cache'.
            (lambda _


@@ 10058,7 10068,8 @@ shared object databases, search tools and indexing.")
           python
           python-pygobject))
    (inputs
     (list dconf
     (list bash-minimal
           dconf
           gexiv2
           gvfs
           exempi

M gnu/packages/patches/nautilus-extension-search-path.patch => gnu/packages/patches/nautilus-extension-search-path.patch +21 -26
@@ 1,11 1,11 @@
Allow Nautilus to search for extensions in the directories listed
in $NAUTILUS_EXTENSION_PATH.

Index: nautilus-44.2/src/nautilus-module.c
Index: nautilus-46.1/src/nautilus-module.c
===================================================================
--- nautilus-44.2.orig/src/nautilus-module.c
+++ nautilus-44.2/src/nautilus-module.c
@@ -220,8 +220,16 @@ static void
--- nautilus-46.1.orig/src/nautilus-module.c
+++ nautilus-46.1/src/nautilus-module.c
@@ -219,8 +219,16 @@ static void
 load_module_dir (const char *dirname)
 {
     GDir *dir;


@@ 18,12 18,12 @@ Index: nautilus-44.2/src/nautilus-module.c
+                             (const gchar **)installed_module_names);
+
+    if (loaded == NULL)
+      loaded = g_hash_table_new (g_str_hash, g_str_equal);
+        loaded = g_hash_table_new (g_str_hash, g_str_equal);
+
     dir = g_dir_open (dirname, 0, NULL);
 
     if (dir)
@@ -232,16 +240,24 @@ load_module_dir (const char *dirname)
@@ -231,13 +239,20 @@ load_module_dir (const char *dirname)
         {
             if (g_str_has_suffix (name, "." G_MODULE_SUFFIX))
             {


@@ 44,19 44,14 @@ Index: nautilus-44.2/src/nautilus-module.c
+                    filename = g_build_filename (dirname,
+                                                 name,
+                                                 NULL);
+                    nautilus_module_load_file (filename,
+                                               installed_module_name_builder);
+                    nautilus_module_load_file (filename, installed_module_name_builder);
+                    g_hash_table_add (loaded, g_strdup (name));
+                    g_free (filename);
+                }
             }
-        }
         }
 
+        }
         g_dir_close (dir);
     }
 
@@ -278,10 +294,24 @@ nautilus_module_setup (void)
@@ -277,9 +292,24 @@ nautilus_module_setup (void)
 
     if (!initialized)
     {


@@ 64,20 59,20 @@ Index: nautilus-44.2/src/nautilus-module.c
         initialized = TRUE;
 
         load_module_dir (NAUTILUS_EXTENSIONDIR);
 
+	/* Load additional modules from the user-provided search path.  */
+	extension_path = g_getenv ("NAUTILUS_EXTENSION_PATH");
+	if (extension_path)
+	  {
+	    char **extension_dirs, **d;
+
+	    extension_dirs = g_strsplit (extension_path, ":", -1);
+	    for (d = extension_dirs; d != NULL && *d != NULL; d++)
+	      load_module_dir (*d);
+        /* Load additional modules from the user-provided search path.  */
+        extension_path = g_getenv ("NAUTILUS_EXTENSION_PATH");
+        if (extension_path)
+        {
+            char **extension_dirs, **d;
+
+	    g_strfreev (extension_dirs);
+	  }
+            extension_dirs = g_strsplit (extension_path, ":", -1);
+            for (d = extension_dirs; d != NULL && *d != NULL; d++)
+                load_module_dir (*d);
+
+            g_strfreev (extension_dirs);
+        }
+
         eel_debug_call_at_shutdown (free_module_objects);
     }
 }