unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Griffin <a@ajgrf.com>
To: guix-devel@gnu.org
Subject: [PATCH] gnu: password-store: Wrap PATH.
Date: Thu, 28 Jul 2016 19:20:24 -0500	[thread overview]
Message-ID: <1469751624.114434.679895025.599AB6DD@webmail.messagingengine.com> (raw)

[-- 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


             reply	other threads:[~2016-07-29  0:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-29  0:20 Alex Griffin [this message]
2016-07-29  0:38 ` [PATCH] gnu: password-store: Wrap PATH 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469751624.114434.679895025.599AB6DD@webmail.messagingengine.com \
    --to=a@ajgrf.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).