diff mbox series

[bug#68447,gnome-team,v3,1/2] gnu: duplicity: Wrap for GI_TYPELIB_PATH.

Message ID 8e89d62b7cc2d3a0197633964c080c569eb5bc73.1706550998.git.vivien@planete-kraus.eu
State New
Headers show
Series Wrap duplicity, with bash-minimal! | expand

Commit Message

Vivien Kraus Jan. 22, 2024, 9:02 p.m. UTC
* gnu/packages/backup.scm (duplicity) [native-inputs]: Add
gobject-introspection.
[inputs]: Add bash-minimal.
[#:phases]: Add 'gi-wrap.

Change-Id: If9d6a6bb0e855a4d775c1e4adb3b07f71be43090
---
 gnu/packages/backup.scm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 3126464347..e627531102 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -118,6 +118,7 @@  (define-public duplicity
     (build-system python-build-system)
     (native-inputs
      (list gettext-minimal ; for msgfmt
+           gobject-introspection
            util-linux ; setsid command, for the tests
            par2cmdline
            python-fasteners
@@ -132,7 +133,8 @@  (define-public duplicity
     (propagated-inputs
      (list python-lockfile python-pygobject python-urllib3))
     (inputs
-     (list dbus ; dbus-launch (Gio backend)
+     (list bash-minimal ; to run the wrapped program
+           dbus ; dbus-launch (Gio backend)
            librsync
            lftp
            gnupg ; gpg executable needed
@@ -172,7 +174,12 @@  (define-public duplicity
                                                    "share/zoneinfo"))
                    ;; Some things respect TMPDIR, others hard-code /tmp, and the
                    ;; defaults don't match up, breaking test_restart.  Fix it.
-                   (setenv "TMPDIR" "/tmp"))))))
+                   (setenv "TMPDIR" "/tmp")))
+               (add-after 'wrap 'gi-wrap
+                 (lambda _
+                   (let ((prog (string-append #$output "/bin/duplicity")))
+                     (wrap-program prog
+                       `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))))
     (home-page "https://duplicity.gitlab.io/duplicity-web/")
     (synopsis "Encrypted backup using rsync algorithm")
     (description