guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: gnu: pass-age: Unpropagate inputs.


From: guix-commits
Subject: 01/05: gnu: pass-age: Unpropagate inputs.
Date: Wed, 19 Oct 2022 19:29:06 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit 07232e6b17247495135fa3285e9eb2bd659bec94
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Oct 16 02:00:00 2022 +0200

    gnu: pass-age: Unpropagate inputs.
    
    * gnu/packages/password-utils.scm (pass-age)[arguments]:
    Add a new 'wrap-script phase.
    [propagated-inputs]: Move them all from here…
    [inputs]: …to here.  Add missing procps for /bin/pkill.
---
 gnu/packages/password-utils.scm | 38 +++++++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 9c5fd65d37..9d5fd79c58 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -636,19 +636,43 @@ through the pass command.")
         (base32 "17899whffnpqqx9x1nx2b8bfxbxlh1pwlglqa0kznl0cn6sb37ql"))))
     (build-system copy-build-system)
     (arguments
-     '(#:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'rename-script
-                    (lambda _
-                      (rename-file "src/password-store.sh"
-                                   "src/passage"))))
+     '(#:modules
+       ((guix build copy-build-system)
+        (guix build utils)
+        (srfi srfi-26))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'rename-script
+           (lambda _
+             (rename-file "src/password-store.sh"
+                          "src/passage")))
+         (add-after 'install 'wrap-script
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (script (string-append out "/bin/passage")))
+               (substitute* script
+                 ;; Avoid ugly ‘.passage-real’ in --help output and elsewhere.
+                 (("^(PROGRAM=).*" _ program=)
+                  (string-append program= (basename script) "\n")))
+               (wrap-program script
+                 `("PATH" ":" prefix
+                   ,(map dirname
+                         (map (cut search-input-file inputs <>)
+                              (list "bin/age"
+                                    "bin/getopt"
+                                    "bin/git"
+                                    "bin/pkill"
+                                    "bin/qrencode"
+                                    "bin/sed"
+                                    "bin/tree")))))))))
        #:install-plan
        '(("src/passage" "/bin/")
          ("src/completion/pass.bash-completion"
           "/share/bash-completion/completions/")
          ("src/completion/pass.zsh-completion"
           "/share/zsh/site-functions/"))))
-    (propagated-inputs
-     (list util-linux git qrencode sed tree age))
+    (inputs
+     (list age git procps qrencode sed tree util-linux))
     (home-page "https://github.com/FiloSottile/passage";)
     (synopsis "Encrypted password manager")
     (description "This package provides an encrypted password manager, forked



reply via email to

[Prev in Thread] Current Thread [Next in Thread]