unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: password-store: Wrap PATH.
@ 2016-07-29  0:20 Alex Griffin
  2016-07-29  0:38 ` Alex Griffin
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Griffin @ 2016-07-29  0:20 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 123 bytes --]

This patch fixes password-store so that you no longer need to install
its dependencies into your profile.
-- 
Alex Griffin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-password-store-Wrap-PATH.patch --]
[-- Type: text/x-patch; name="0001-gnu-password-store-Wrap-PATH.patch", Size: 2696 bytes --]

From 60527038221d2c1c0d35ca97a65ba2a01734da75 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Thu, 28 Jul 2016 19:06:10 -0500
Subject: [PATCH] gnu: password-store: Wrap PATH.

* gnu/packages/password-utils.scm (password-store):
[arguments]: Wrap PATH more thoroughly.
[native-inputs]: Move getopt to inputs.
[inputs]: Add sed & alphabetize packages.
---
 gnu/packages/password-utils.scm | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index a03214a..eda800b 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -266,27 +266,25 @@ any X11 window.")
      '(#:phases
        (modify-phases %standard-phases
          (delete 'configure)
-         (add-after
-          ;; The script requires 'getopt' at run-time, and this allows
-          ;; the user to not install the providing package 'util-linux'
-          ;; in their profile.
-          'unpack 'patch-path
-          (lambda* (#:key inputs outputs #:allow-other-keys)
-            (let ((getopt (string-append (assoc-ref inputs "getopt")
-                                         "/bin/getopt")))
-              (substitute* "src/password-store.sh"
-                (("GETOPT=\"getopt\"")
-                 (string-append "GETOPT=\"" getopt "\"")))
-              #t))))
+         (add-after 'install 'wrap-path
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (path (map (lambda (pkg)
+                                 (string-append (assoc-ref inputs pkg) "/bin"))
+                               '("coreutils" "getopt" "git" "gnupg" "pwgen"
+                                 "sed" "tree" "which" "xclip"))))
+               (wrap-program (string-append out "/bin/pass")
+                 `("PATH" ":" prefix (,(string-join path ":"))))))))
        #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
        #:test-target "test"))
-    (native-inputs `(("getopt" ,util-linux))) ; getopt for the tests
-    (inputs `(("gnupg" ,gnupg)
-              ("pwgen" ,pwgen)
-              ("xclip" ,xclip)
+    (inputs `(("getopt" ,util-linux)
               ("git" ,git)
+              ("gnupg" ,gnupg)
+              ("pwgen" ,pwgen)
+              ("sed" ,sed)
               ("tree" ,tree)
-              ("which" ,which)))
+              ("which" ,which)
+              ("xclip" ,xclip)))
     (home-page "http://www.passwordstore.org/")
     (synopsis "Encrypted password manager")
     (description "Password-store is a password manager which uses GnuPG to
-- 
2.9.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-07-29 16:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-29  0:20 [PATCH] gnu: password-store: Wrap PATH Alex Griffin
2016-07-29  0:38 ` Alex Griffin
2016-07-29  9:07   ` Mathieu Lirzin
2016-07-29 14:02     ` Thompson, David
2016-07-29 14:27       ` Alex Griffin
2016-07-29 16:57         ` Mathieu Lirzin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).