about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/backup/deja-dup/default.nix22
-rw-r--r--pkgs/applications/backup/deja-dup/fix-paths.patch21
2 files changed, 19 insertions, 24 deletions
diff --git a/pkgs/applications/backup/deja-dup/default.nix b/pkgs/applications/backup/deja-dup/default.nix
index b0d8ae8d3cf6..1ea4b4d27506 100644
--- a/pkgs/applications/backup/deja-dup/default.nix
+++ b/pkgs/applications/backup/deja-dup/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, meson, ninja, pkgconfig, vala_0_38, gettext
-, gnome3, libnotify, intltool, itstool, glib, gtk3, libxml2
+{ stdenv, fetchurl, substituteAll, meson, ninja, pkgconfig, vala_0_40, gettext
+, gnome3, libnotify, itstool, glib, gtk3, libxml2
 , coreutils, libsecret, pcre, libxkbcommon, wrapGAppsHook
 , libpthreadstubs, libXdmcp, epoxy, at-spi2-core, dbus, libgpgerror
 , appstream-glib, desktop-file-utils, duplicity
@@ -15,20 +15,14 @@ stdenv.mkDerivation rec {
   };
 
   patches = [
-    ./fix-paths.patch
+    (substituteAll {
+      src = ./fix-paths.patch;
+      inherit coreutils;
+    })
   ];
 
-  postPatch = ''
-    substituteInPlace libdeja/tools/duplicity/DuplicityInstance.vala --replace \
-      "/bin/rm" \
-      "${coreutils}/bin/rm"
-  '';
-
-  # couldn't find gio/gdesktopappinfo.h
-  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
-
   nativeBuildInputs = [
-    meson ninja pkgconfig vala_0_38 gettext intltool itstool
+    meson ninja pkgconfig vala_0_40 gettext itstool
     appstream-glib desktop-file-utils libxml2 wrapGAppsHook
   ];
 
@@ -40,6 +34,8 @@ stdenv.mkDerivation rec {
 
   propagatedUserEnvPkgs = [ duplicity ];
 
+  PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/lib/nautilus/extensions-3.0";
+
   postInstall = ''
     glib-compile-schemas $out/share/glib-2.0/schemas
   '';
diff --git a/pkgs/applications/backup/deja-dup/fix-paths.patch b/pkgs/applications/backup/deja-dup/fix-paths.patch
index 1cc57e6a54a2..26126fdc9d56 100644
--- a/pkgs/applications/backup/deja-dup/fix-paths.patch
+++ b/pkgs/applications/backup/deja-dup/fix-paths.patch
@@ -1,12 +1,11 @@
-diff --git a/deja-dup/nautilus/meson.build b/deja-dup/nautilus/meson.build
-index 04b136f3..ed8f7cba 100644
---- a/deja-dup/nautilus/meson.build
-+++ b/deja-dup/nautilus/meson.build
-@@ -31,6 +31,6 @@ shared_module('deja-dup', ['NautilusExtension.c'],
-     link_with: [dirhandling],
-     dependencies: [nautilus_dep],
-     install: true,
--    install_dir: nautilus_dep.get_pkgconfig_variable('extensiondir'))
-+    install_dir: join_paths(get_option('libdir'), 'nautilus', 'extensions-3.0'))
+--- a/libdeja/tools/duplicity/DuplicityInstance.vala
++++ b/libdeja/tools/duplicity/DuplicityInstance.vala
+@@ -159,7 +159,7 @@
+     // We already are pretty sure we don't have other duplicities in our
+     // archive directories, because we use our own and we ensure we only have
+     // one deja-dup running at a time via DBus.
+-    Posix.system("/bin/rm -f " + Shell.quote(cache_dir) + "/*/lockfile.lock");
++    Posix.system("@coreutils@/bin/rm -f " + Shell.quote(cache_dir) + "/*/lockfile.lock");
  
- endif
+     Process.spawn_async_with_pipes(null, real_argv, real_envp,
+                         SpawnFlags.SEARCH_PATH |