nautilus 3.12: find extensions

This commit is contained in:
Luca Bruno 2014-05-28 17:07:40 +02:00
parent 338969701c
commit bf6ddc6285
3 changed files with 29 additions and 0 deletions

View File

@ -94,6 +94,9 @@ in {
# Let gnome-control-center find gnome-shell search providers
export GNOME_SEARCH_PROVIDERS_DIR=${config.system.path}/share/gnome-shell/search-providers/
# Let nautilus find extensions
export NAUTILUS_EXTENSION_DIR=${config.system.path}/lib/nautilus/extensions-3.0/
# Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update

View File

@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$out/share:$GSETTINGS_SCHEMAS_PATH"
'';
patches = [ ./extension_dir.patch ];
meta = with stdenv.lib; {
platforms = platforms.linux;
};

View File

@ -0,0 +1,24 @@
diff --git a/libnautilus-private/nautilus-module.c b/libnautilus-private/nautilus-module.c
index 6273a76..4adcc8a 100644
--- a/libnautilus-private/nautilus-module.c
+++ b/libnautilus-private/nautilus-module.c
@@ -242,11 +242,17 @@ void
nautilus_module_setup (void)
{
static gboolean initialized = FALSE;
+ const gchar* extensiondir = NULL;
if (!initialized) {
initialized = TRUE;
-
- load_module_dir (NAUTILUS_EXTENSIONDIR);
+
+ extensiondir = g_getenv ("NAUTILUS_EXTENSION_DIR");
+ if (extensiondir == NULL) {
+ extensiondir = NAUTILUS_EXTENSIONDIR;
+ }
+
+ load_module_dir (extensiondir);
eel_debug_call_at_shutdown (free_module_objects);
}