aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2021-12-11 08:38:23 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2021-12-31 14:57:03 +0100
commitca0e932505452b07cd1f026e5d9f5998d1fc00e1 (patch)
treea223ef5c9581edb7892e8f8508ba9df2230c625e
parent952ebf02cededca67b717284c498d730a9c4f6cc (diff)
downloadguix-ca0e932505452b07cd1f026e5d9f5998d1fc00e1.tar
guix-ca0e932505452b07cd1f026e5d9f5998d1fc00e1.tar.gz
gnu: nautilus: Enable loading of third-party extensions.
* gnu/packages/gnome.scm (nautilus)[#:phases]: Add phase to enable loading through NAUTILUS_EXTENSIONS_PATH. [native-search-paths]: Add NAUTILUS_EXTENSIONS_PATH.
-rw-r--r--gnu/packages/gnome.scm25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4edc2dd629..ffa1a9bbc2 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9076,6 +9076,27 @@ shared object databases, search tools and indexing.")
#:meson ,meson-0.59
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'make-extensible
+ (lambda _
+ (substitute* "src/nautilus-module.c"
+ (("static gboolean initialized = FALSE;" all)
+ (string-append all "
+const char *extension_path;
+char **extension_dirs, **d;
+")
+ )
+ (("load_module_dir \\(NAUTILUS_EXTENSIONDIR\\);" all)
+ (string-append all
+ "
+extension_path = g_getenv (\"NAUTILUS_EXTENSION_PATH\");
+if (extension_path)
+{
+ extension_dirs = g_strsplit (extension_path, \":\", -1);
+ for (d = extension_dirs; d != NULL && *d != NULL; d++)
+ load_module_dir(*d);
+ g_strfreev(extension_dirs);
+}
+")))))
(add-after 'unpack 'skip-gtk-update-icon-cache
;; Don't create 'icon-theme.cache'.
(lambda _
@@ -9114,6 +9135,10 @@ shared object databases, search tools and indexing.")
("gtk+" ,gtk+)
("libexif" ,libexif)
("libxml2" ,libxml2)))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "NAUTILUS_EXTENSION_PATH")
+ (files '("lib/nautilus/site-extensions")))))
(synopsis "File manager for GNOME")
(home-page "https://wiki.gnome.org/Apps/Nautilus")
(description