summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/backup
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2018-06-19 16:53:56 +0000
committerGitHub <noreply@github.com>2018-06-19 16:53:56 +0000
commitbcc60fad866f749c3d399aab58af316637485fe4 (patch)
tree30ba4218b6189c9920cd433bb2f7130f9350760f /pkgs/applications/backup
parent42b28bfd7bf8c3110f0697a71c433e4a049f5449 (diff)
parent3ab1993b1fb977764547e42529b4d21dc3b50112 (diff)
Merge pull request #42177 from jtojnar/deja-dup-nautilus
deja-dup: fix nautilus extension breaking nautilus
Diffstat (limited to 'pkgs/applications/backup')
-rw-r--r--pkgs/applications/backup/deja-dup/default.nix5
-rw-r--r--pkgs/applications/backup/deja-dup/hardcode-gsettings.patch38
2 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/applications/backup/deja-dup/default.nix b/pkgs/applications/backup/deja-dup/default.nix
index 311686d0c77b..797a00f4fc4a 100644
--- a/pkgs/applications/backup/deja-dup/default.nix
+++ b/pkgs/applications/backup/deja-dup/default.nix
@@ -19,8 +19,13 @@ stdenv.mkDerivation rec {
src = ./fix-paths.patch;
inherit coreutils;
})
+ ./hardcode-gsettings.patch
];
+ postPatch = ''
+ substituteInPlace deja-dup/nautilus/NautilusExtension.c --subst-var-by DEJA_DUP_GSETTINGS_PATH $out/share/gsettings-schemas/${name}/glib-2.0/schemas
+ '';
+
nativeBuildInputs = [
meson ninja pkgconfig vala_0_40 gettext itstool
appstream-glib desktop-file-utils libxml2 wrapGAppsHook
diff --git a/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch b/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch
new file mode 100644
index 000000000000..50bf2ba4fbd5
--- /dev/null
+++ b/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch
@@ -0,0 +1,38 @@
+--- a/deja-dup/nautilus/NautilusExtension.c
++++ b/deja-dup/nautilus/NautilusExtension.c
+@@ -24,6 +24,8 @@
+ #include <glib/gi18n-lib.h>
+
+ GList *dirs = NULL;
++GSettingsSchemaSource *schema_source = NULL;
++GSettingsSchema *schema = NULL;
+ GSettings *settings = NULL;
+
+ // This will treat a < b iff a is 'lower' in the file tree than b
+@@ -313,7 +315,13 @@
+ bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+
+- settings = g_settings_new("org.gnome.DejaDup");
++ schema_source = g_settings_schema_source_new_from_directory ("@DEJA_DUP_GSETTINGS_PATH@",
++ g_settings_schema_source_get_default (), TRUE, NULL);
++
++ schema = g_settings_schema_source_lookup (schema_source,
++ "org.gnome.DejaDup", FALSE);
++
++ settings = g_settings_new_full (schema, NULL, NULL);
+ g_signal_connect(settings, "changed::include-list",
+ update_include_excludes, NULL);
+ g_signal_connect(settings, "changed::exclude-list",
+@@ -329,7 +337,11 @@
+
+ void nautilus_module_shutdown(void)
+ {
++ g_settings_schema_source_unref(schema_source);
++ g_settings_schema_unref(schema);
+ g_object_unref(settings);
++ schema_source = NULL;
++ schema = NULL;
+ settings = NULL;
+
+ update_include_excludes(); /* will clear it now that settings is NULL */