cajaWithExtensions: init at 1.18.3

This commit is contained in:
romildo 2017-08-18 00:19:58 -03:00
parent 1a04652900
commit b5eab8f943
4 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,30 @@
diff --git a/libcaja-private/caja-module.c b/libcaja-private/caja-module.c
index 023c22e..414913b 100644
--- a/libcaja-private/caja-module.c
+++ b/libcaja-private/caja-module.c
@@ -258,11 +258,25 @@ caja_module_setup (void)
{
static gboolean initialized = FALSE;
GList *res;
+ 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);

View File

@ -0,0 +1,11 @@
{ buildEnv, makeWrapper, caja, extensions ? [] }:
buildEnv {
name = "cajaWithExtensions-${caja.version}";
meta = caja.meta // { description = "File manager (including extensions) for the MATE desktop"; };
paths = [ caja ] ++ extensions;
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram "$out/bin/caja" --set CAJA_EXTENSION_DIRS "$out/lib/caja/extensions-2.0"
'';
}

View File

@ -26,6 +26,10 @@ stdenv.mkDerivation rec {
mate.mate-desktop
];
patches = [
./caja-extension-dirs.patch
];
configureFlags = [ "--disable-update-mimedb" ];
meta = {

View File

@ -3,6 +3,9 @@ rec {
atril = callPackage ./atril { };
caja = callPackage ./caja { };
caja-extensions = callPackage ./caja-extensions { };
cajaWithExtensions = callPackage ./caja/cajaWithExtensions.nix {
extensions = [ caja-extensions ];
};
eom = callPackage ./eom { };
pluma = callPackage ./pluma { };
mate-common = callPackage ./mate-common { };