diff options
Diffstat (limited to 'pkgs/applications/backup/deja-dup')
-rw-r--r-- | pkgs/applications/backup/deja-dup/default.nix | 90 | ||||
-rw-r--r-- | pkgs/applications/backup/deja-dup/hardcode-gsettings.patch | 30 |
2 files changed, 71 insertions, 49 deletions
diff --git a/pkgs/applications/backup/deja-dup/default.nix b/pkgs/applications/backup/deja-dup/default.nix index 7120a1934f6e1..d19314ce9ce18 100644 --- a/pkgs/applications/backup/deja-dup/default.nix +++ b/pkgs/applications/backup/deja-dup/default.nix @@ -1,20 +1,46 @@ -{ stdenv, fetchFromGitLab, substituteAll, meson, ninja, pkgconfig, vala_0_40, gettext -, gnome3, libnotify, itstool, glib, gtk3, libxml2, gnome-online-accounts -, coreutils, libpeas, libsecret, pcre, libxkbcommon, wrapGAppsHook -, libpthreadstubs, libXdmcp, epoxy, at-spi2-core, dbus, libgpgerror -, appstream-glib, desktop-file-utils, duplicity +{ stdenv +, fetchFromGitLab +, substituteAll +, meson +, ninja +, pkgconfig +, vala +, gettext +, gnome3 +, libnotify +, itstool +, glib +, gtk3 +, libxml2 +, gnome-online-accounts +, coreutils +, libsoup +, libsecret +, pcre +, libxkbcommon +, wrapGAppsHook +, libpthreadstubs +, libXdmcp +, epoxy +, at-spi2-core +, dbus +, libgpgerror +, json-glib +, appstream-glib +, desktop-file-utils +, duplicity }: stdenv.mkDerivation rec { pname = "deja-dup"; - version = "38.3"; + version = "40.4"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "World"; repo = pname; rev = version; - sha256 = "1bnvmdlm67k1b6115x75j3nl92x5yl4psq5pna2w6cg9npxdd3fa"; + sha256 = "0x9z8z1mh1sxi28ilml3pvbc0g6ghcbyiy002rziwwlarxnbwkky"; }; patches = [ @@ -22,37 +48,55 @@ stdenv.mkDerivation rec { src = ./fix-paths.patch; inherit coreutils; }) + + # Hardcode GSettings path for Nautilus extension to avoid crashes from missing schemas ./hardcode-gsettings.patch ]; postPatch = '' - substituteInPlace deja-dup/nautilus/NautilusExtension.c --subst-var-by DEJA_DUP_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} + # substitute variable from hardcode-gsettings.patch + substituteInPlace deja-dup/nautilus/NautilusExtension.c --subst-var-by DEJA_DUP_GSETTINGS_PATH "${glib.makeSchemaPath (placeholder "out") "${pname}-${version}"}" ''; nativeBuildInputs = [ - meson ninja pkgconfig vala_0_40 gettext itstool - appstream-glib desktop-file-utils libxml2 wrapGAppsHook + meson + ninja + pkgconfig + vala + gettext + itstool + appstream-glib + desktop-file-utils + libxml2 + wrapGAppsHook ]; buildInputs = [ - libnotify libpeas glib gtk3 libsecret - pcre libxkbcommon libpthreadstubs libXdmcp epoxy gnome3.nautilus - at-spi2-core dbus gnome-online-accounts libgpgerror + libnotify + libsoup + glib + gtk3 + libsecret + pcre + libxkbcommon + libpthreadstubs + libXdmcp + epoxy + gnome3.nautilus + at-spi2-core + dbus + gnome-online-accounts # GOA not used any more, only for transferring legacy keys + libgpgerror + json-glib ]; + # TODO: hard code the path + # https://gitlab.gnome.org/World/deja-dup/merge_requests/32 propagatedUserEnvPkgs = [ duplicity ]; + # install nautilus plug-in to correct path PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/lib/nautilus/extensions-3.0"; - postInstall = '' - glib-compile-schemas $out/share/glib-2.0/schemas - ''; - - postFixup = '' - # Unwrap accidentally wrapped library - mv $out/libexec/deja-dup/tools/.libduplicity.so-wrapped $out/libexec/deja-dup/tools/libduplicity.so - ''; - meta = with stdenv.lib; { description = "A simple backup tool"; longDescription = '' @@ -60,7 +104,7 @@ stdenv.mkDerivation rec { of backing up the Right Way (encrypted, off-site, and regular) \ and uses duplicity as the backend. ''; - homepage = https://wiki.gnome.org/Apps/DejaDup; + homepage = "https://wiki.gnome.org/Apps/DejaDup"; license = licenses.gpl3Plus; maintainers = with maintainers; [ jtojnar joncojonathan ]; platforms = platforms.linux; diff --git a/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch b/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch index 50bf2ba4fbd52..f74dbf73543e1 100644 --- a/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch +++ b/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch @@ -1,38 +1,16 @@ --- 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 @@ +@@ -313,7 +313,12 @@ 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@", +- settings = g_settings_new(APPLICATION_ID); ++ g_autoptr (GSettingsSchemaSource) 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); ++ g_autoptr (GSettingsSchema) schema = g_settings_schema_source_lookup (schema_source, APPLICATION_ID, 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 */ |