Subject: [WIP v2 4/4] WIP: Vorta: Use gexps instead of (assoc-ref ...)

From: Leo Famulari <[email-masked]>
Date: Sun, 19 Dec 2021 13:56:26 -0500

---
 gnu/packages/backup.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index e2a37d182b..16353682dd 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -1209,11 +1209,10 @@ (define-public vorta
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-borg-path
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((borg (string-append (assoc-ref inputs "borg")
-                                        "/bin/borg")))
-               (substitute* "src/vorta/borg/borg_job.py"
-                 (("which\\('borg'\\)")
-                  (string-append "which('" borg "')"))))))
+             (substitute* "src/vorta/borg/borg_job.py"
+               (("which\\('borg'\\)")
+                (string-append "which('" ,#$(this-package-input borg)
+                               "/bin/borg')")))))
          ;; XXX This phase tries to write to $HOME
          (add-before 'sanity-check 'set-HOME
            (lambda _
-- 
2.34.0