mate.caja-extensions: 1.26.1 -> 1.28.0

https://github.com/mate-desktop/caja-extensions/compare/v1.26.1...v1.28.0

Also removes hardcode-gsettings.patch:

* caja-with-extensions should handle this fine.
* We don't set CAJA_EXTENSION_DIR using sessionVariables now.

+13 -192
+13 -23
pkgs/desktops/mate/caja-extensions/default.nix
··· 3 3 , fetchurl 4 4 , pkg-config 5 5 , gettext 6 + , caja 7 + , glib 8 + , gst_all_1 6 9 , gtk3 7 10 , gupnp 8 - , mate 9 11 , imagemagick 12 + , mate-desktop 10 13 , wrapGAppsHook 11 14 , mateUpdateScript 12 - , glib 13 - , substituteAll 14 15 }: 15 16 16 17 stdenv.mkDerivation rec { 17 18 pname = "caja-extensions"; 18 - version = "1.26.1"; 19 + version = "1.28.0"; 19 20 20 21 src = fetchurl { 21 22 url = "https://pub.mate-desktop.org/releases/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 22 - sha256 = "WJwZ4/oQJC1iOaXMuVhVmENqVuvpTS6ypQtZUMzh1SA="; 23 + sha256 = "0phsXgdAg1/icc+9WCPu6vAyka8XYyA/RwCruBCeMXU="; 23 24 }; 24 25 25 26 nativeBuildInputs = [ ··· 29 30 ]; 30 31 31 32 buildInputs = [ 33 + caja 34 + glib 35 + gst_all_1.gstreamer 36 + gst_all_1.gst-plugins-base 37 + gst_all_1.gst-plugins-good 32 38 gtk3 33 39 gupnp 34 - mate.caja 35 - mate.mate-desktop 36 40 imagemagick 37 - ]; 38 - 39 - patches = [ 40 - (substituteAll { 41 - src = ./hardcode-gsettings.patch; 42 - caja_gsetttings_path = glib.getSchemaPath mate.caja; 43 - desktop_gsetttings_path = glib.getSchemaPath mate.mate-desktop; 44 - }) 41 + mate-desktop 45 42 ]; 46 43 47 44 postPatch = '' 48 - substituteInPlace open-terminal/caja-open-terminal.c --subst-var-by \ 49 - GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} 50 - substituteInPlace sendto/caja-sendto-command.c --subst-var-by \ 51 - GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} 52 - substituteInPlace wallpaper/caja-wallpaper-extension.c --subst-var-by \ 53 - GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} 54 - 55 45 for f in image-converter/caja-image-{resizer,rotator}.c; do 56 - substituteInPlace $f --replace "/usr/bin/convert" "${imagemagick}/bin/convert" 46 + substituteInPlace $f --replace-fail 'argv[0] = "convert"' 'argv[0] = "${imagemagick}/bin/convert"' 57 47 done 58 48 ''; 59 49
-169
pkgs/desktops/mate/caja-extensions/hardcode-gsettings.patch
··· 1 - diff --git a/open-terminal/caja-open-terminal.c b/open-terminal/caja-open-terminal.c 2 - index e14a9bf..691afab 100644 3 - --- a/open-terminal/caja-open-terminal.c 4 - +++ b/open-terminal/caja-open-terminal.c 5 - @@ -135,8 +135,18 @@ desktop_opens_home_dir (void) 6 - { 7 - gboolean result; 8 - GSettings* settings; 9 - - 10 - - settings = g_settings_new (COT_SCHEMA); 11 - + GSettingsSchemaSource* schema_source; 12 - + GSettingsSchema* schema; 13 - + 14 - + schema_source = g_settings_schema_source_new_from_directory("@GSETTINGS_PATH@", 15 - + g_settings_schema_source_get_default(), 16 - + TRUE, NULL); 17 - + schema = g_settings_schema_source_lookup(schema_source, 18 - + COT_SCHEMA, 19 - + FALSE); 20 - + settings = g_settings_new_full(schema, NULL, NULL); 21 - + g_settings_schema_source_unref(schema_source); 22 - + g_settings_schema_unref(schema); 23 - result = g_settings_get_boolean (settings, COT_DESKTOP_KEY); 24 - g_object_unref (settings); 25 - return result; 26 - @@ -147,8 +157,18 @@ set_desktop_opens_home_dir (gboolean val) 27 - { 28 - gboolean result; 29 - GSettings* settings; 30 - - 31 - - settings = g_settings_new (COT_SCHEMA); 32 - + GSettingsSchemaSource* schema_source; 33 - + GSettingsSchema* schema; 34 - + 35 - + schema_source = g_settings_schema_source_new_from_directory("@GSETTINGS_PATH@", 36 - + g_settings_schema_source_get_default(), 37 - + TRUE, NULL); 38 - + schema = g_settings_schema_source_lookup(schema_source, 39 - + COT_SCHEMA, 40 - + FALSE); 41 - + settings = g_settings_new_full(schema, NULL, NULL); 42 - + g_settings_schema_source_unref(schema_source); 43 - + g_settings_schema_unref(schema); 44 - result = g_settings_set_boolean (settings, COT_DESKTOP_KEY, val); 45 - g_object_unref (settings); 46 - return result; 47 - @@ -159,8 +179,18 @@ desktop_is_home_dir (void) 48 - { 49 - gboolean result; 50 - GSettings* settings; 51 - - 52 - - settings = g_settings_new (CAJA_SCHEMA); 53 - + GSettingsSchemaSource* schema_source; 54 - + GSettingsSchema* schema; 55 - + 56 - + schema_source = g_settings_schema_source_new_from_directory("@caja_gsetttings_path@", 57 - + g_settings_schema_source_get_default(), 58 - + TRUE, NULL); 59 - + schema = g_settings_schema_source_lookup(schema_source, 60 - + CAJA_SCHEMA, 61 - + FALSE); 62 - + settings = g_settings_new_full(schema, NULL, NULL); 63 - + g_settings_schema_source_unref(schema_source); 64 - + g_settings_schema_unref(schema); 65 - result = g_settings_get_boolean (settings, CAJA_DESKTOP_KEY); 66 - g_object_unref (settings); 67 - return result; 68 - @@ -171,8 +201,18 @@ default_terminal_application (void) 69 - { 70 - gchar *result; 71 - GSettings* settings; 72 - - 73 - - settings = g_settings_new (TERM_SCHEMA); 74 - + GSettingsSchemaSource* schema_source; 75 - + GSettingsSchema* schema; 76 - + 77 - + schema_source = g_settings_schema_source_new_from_directory("@desktop_gsetttings_path@", 78 - + g_settings_schema_source_get_default(), 79 - + TRUE, NULL); 80 - + schema = g_settings_schema_source_lookup(schema_source, 81 - + TERM_SCHEMA, 82 - + FALSE); 83 - + settings = g_settings_new_full(schema, NULL, NULL); 84 - + g_settings_schema_source_unref(schema_source); 85 - + g_settings_schema_unref(schema); 86 - result = g_settings_get_string (settings, TERM_EXEC_KEY); 87 - g_object_unref (settings); 88 - 89 - @@ -189,8 +229,18 @@ set_default_terminal_application (const gchar* exec) 90 - { 91 - gboolean result; 92 - GSettings* settings; 93 - - 94 - - settings = g_settings_new (TERM_SCHEMA); 95 - + GSettingsSchemaSource* schema_source; 96 - + GSettingsSchema* schema; 97 - + 98 - + schema_source = g_settings_schema_source_new_from_directory("@desktop_gsetttings_path@", 99 - + g_settings_schema_source_get_default(), 100 - + TRUE, NULL); 101 - + schema = g_settings_schema_source_lookup(schema_source, 102 - + TERM_SCHEMA, 103 - + FALSE); 104 - + settings = g_settings_new_full(schema, NULL, NULL); 105 - + g_settings_schema_source_unref(schema_source); 106 - + g_settings_schema_unref(schema); 107 - result = g_settings_set_string (settings, TERM_EXEC_KEY, exec); 108 - g_object_unref (settings); 109 - return result; 110 - diff --git a/sendto/caja-sendto-command.c b/sendto/caja-sendto-command.c 111 - index 8181db6..579dc81 100644 112 - --- a/sendto/caja-sendto-command.c 113 - +++ b/sendto/caja-sendto-command.c 114 - @@ -801,6 +801,8 @@ caja_sendto_init (void) 115 - int main (int argc, char **argv) 116 - { 117 - GOptionContext *context; 118 - + GSettingsSchemaSource* schema_source; 119 - + GSettingsSchema* schema; 120 - GError *error = NULL; 121 - 122 - #ifdef ENABLE_NLS 123 - @@ -818,7 +820,15 @@ int main (int argc, char **argv) 124 - return 1; 125 - } 126 - 127 - - settings = g_settings_new ("org.mate.Caja.Sendto"); 128 - + schema_source = g_settings_schema_source_new_from_directory("@GSETTINGS_PATH@", 129 - + g_settings_schema_source_get_default(), 130 - + TRUE, NULL); 131 - + schema = g_settings_schema_source_lookup(schema_source, 132 - + "org.mate.Caja.Sendto", 133 - + FALSE); 134 - + settings = g_settings_new_full(schema, NULL, NULL); 135 - + g_settings_schema_source_unref(schema_source); 136 - + g_settings_schema_unref(schema); 137 - caja_sendto_init (); 138 - if (caja_sendto_plugin_init () == FALSE) { 139 - GtkWidget *error_dialog; 140 - diff --git a/wallpaper/caja-wallpaper-extension.c b/wallpaper/caja-wallpaper-extension.c 141 - index 3119e9f..4f80c88 100644 142 - --- a/wallpaper/caja-wallpaper-extension.c 143 - +++ b/wallpaper/caja-wallpaper-extension.c 144 - @@ -47,6 +47,8 @@ set_wallpaper_callback (CajaMenuItem *item, 145 - { 146 - GList *files; 147 - GSettings *settings; 148 - + GSettingsSchemaSource* schema_source; 149 - + GSettingsSchema* schema; 150 - CajaFileInfo *file; 151 - gchar *uri; 152 - gchar *filename; 153 - @@ -57,7 +59,15 @@ set_wallpaper_callback (CajaMenuItem *item, 154 - uri = caja_file_info_get_uri (file); 155 - filename = g_filename_from_uri(uri, NULL, NULL); 156 - 157 - - settings = g_settings_new (WP_SCHEMA); 158 - + schema_source = g_settings_schema_source_new_from_directory("@desktop_gsetttings_path@", 159 - + g_settings_schema_source_get_default(), 160 - + TRUE, NULL); 161 - + schema = g_settings_schema_source_lookup(schema_source, 162 - + WP_SCHEMA, 163 - + FALSE); 164 - + settings = g_settings_new_full(schema, NULL, NULL); 165 - + g_settings_schema_source_unref(schema_source); 166 - + g_settings_schema_unref(schema); 167 - 168 - g_settings_set_string (settings, WP_FILE_KEY, filename); 169 -