From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Lirzin Subject: Re: [PATCH] gnu: password-store: Wrap PATH. Date: Fri, 29 Jul 2016 11:07:35 +0200 Message-ID: <871t2c7qy0.fsf@gnu.org> References: <1469751624.114434.679895025.599AB6DD@webmail.messagingengine.com> <1469752717.117537.679907329.010AA3BD@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT3lt-0006Zb-36 for guix-devel@gnu.org; Fri, 29 Jul 2016 05:07:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bT3lp-00038f-02 for guix-devel@gnu.org; Fri, 29 Jul 2016 05:07:56 -0400 In-Reply-To: <1469752717.117537.679907329.010AA3BD@webmail.messagingengine.com> (Alex Griffin's message of "Thu, 28 Jul 2016 19:38:37 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Alex Griffin Cc: guix-devel@gnu.org Hello, Alex Griffin writes: > On Thu, Jul 28, 2016, at 07:20 PM, Alex Griffin wrote: > > From 74b838fea52293386169299881cdd7cfefff7f4d Mon Sep 17 00:00:00 2001 > From: Alex Griffin > 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. ^^ Indentation and formatting changes can be omitted in commit log. > --- > gnu/packages/password-utils.scm | 33 ++++++++++++++++----------------- > 1 file changed, 16 insertions(+), 17 deletions(-) > > diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm > index a03214a..497717f 100644 > --- a/gnu/packages/password-utils.scm > +++ b/gnu/packages/password-utils.scm > @@ -6,6 +6,7 @@ > ;;; Copyright © 2016 Jessica Tallon > ;;; Copyright © 2016 Andreas Enge > ;;; Copyright © 2016 Lukas Gradl > +;;; Copyright © 2016 Alex Griffin > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -266,27 +267,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 ":")))))))) 'let*' can safely be replaced by 'let' here. > #: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 Pushed in commit 61201e46a72b715e1a38ce56932c3f4f2d3885b4. Thanks. -- Mathieu Lirzin