about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/backup
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-01-11 23:37:02 +0000
committerAlyssa Ross <hi@alyssa.is>2020-01-11 23:41:30 +0000
commit6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch)
tree035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/applications/backup
parentda7500bc026e937ac7fce7b50f67a0e1765737a7 (diff)
parente4134747f5666bcab8680aff67fa3b63384f9a0f (diff)
downloadnixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/applications/backup')
-rw-r--r--nixpkgs/pkgs/applications/backup/deja-dup/default.nix90
-rw-r--r--nixpkgs/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch30
2 files changed, 71 insertions, 49 deletions
diff --git a/nixpkgs/pkgs/applications/backup/deja-dup/default.nix b/nixpkgs/pkgs/applications/backup/deja-dup/default.nix
index 7120a1934f6e..d283dc7107d7 100644
--- a/nixpkgs/pkgs/applications/backup/deja-dup/default.nix
+++ b/nixpkgs/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.6";
 
   src = fetchFromGitLab {
     domain = "gitlab.gnome.org";
     owner = "World";
     repo = pname;
     rev = version;
-    sha256 = "1bnvmdlm67k1b6115x75j3nl92x5yl4psq5pna2w6cg9npxdd3fa";
+    sha256 = "1d4g34g660wv42a4k2511bxrh90z0vdl3v7ahg0m45phijg9n2n1";
   };
 
   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/nixpkgs/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch b/nixpkgs/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch
index 50bf2ba4fbd5..f74dbf73543e 100644
--- a/nixpkgs/pkgs/applications/backup/deja-dup/hardcode-gsettings.patch
+++ b/nixpkgs/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 */