nixpkgs/pkgs/desktops/mate/caja/caja-extension-dirs.patch

47 lines
1.4 KiB
Diff
Raw Normal View History

2020-02-12 17:51:18 +00:00
From 35e9e6a6f3ba6cbe62a3957044eb67864f5d8e66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= <malaquias@gmail.com>
Date: Tue, 11 Feb 2020 17:49:13 -0300
Subject: [PATCH] Look for caja extentions at $CAJA_EXTENTSION_DIRS
CAJA_EXTENSION_DIRS is a list of paths where caja extensions are
looked for. It is needed for distributions like NixOS that do not
install all extensions in the same directory. In NixOS each package is
installed in a self contained directory.
---
libcaja-private/caja-module.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
2017-08-18 04:19:58 +01:00
diff --git a/libcaja-private/caja-module.c b/libcaja-private/caja-module.c
2020-02-12 17:51:18 +00:00
index d54d7cf..9794e56 100644
2017-08-18 04:19:58 +01:00
--- a/libcaja-private/caja-module.c
+++ b/libcaja-private/caja-module.c
2020-02-12 17:51:18 +00:00
@@ -258,11 +258,25 @@ void
caja_module_setup (void)
2017-08-18 04:19:58 +01:00
{
static gboolean initialized = FALSE;
+ gchar *caja_extension_dirs;
+ gchar **dir_vector;
if (!initialized)
{
initialized = TRUE;
+ caja_extension_dirs = (gchar *) g_getenv ("CAJA_EXTENSION_DIRS");
+
+ if (caja_extension_dirs)
+ {
+ dir_vector = g_strsplit (caja_extension_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
+
+ for (gchar **dir = dir_vector; *dir != NULL; ++ dir)
+ load_module_dir (*dir);
+
+ g_strfreev(dir_vector);
+ }
+
load_module_dir (CAJA_EXTENSIONDIR);
eel_debug_call_at_shutdown (free_module_objects);
2020-02-12 17:51:18 +00:00
--
2.25.0