From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:51166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIVNo-0003iE-5M for guix-patches@gnu.org; Mon, 22 Apr 2019 05:37:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIVNm-00083R-P0 for guix-patches@gnu.org; Mon, 22 Apr 2019 05:37:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36165) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hIVNm-00083F-Lj for guix-patches@gnu.org; Mon, 22 Apr 2019 05:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hIVNm-0005LF-J2 for guix-patches@gnu.org; Mon, 22 Apr 2019 05:37:02 -0400 Subject: bug#35346: [PATCH 2/2] gnu: Add pass-otp. Resent-To: guix-patches@gnu.org Resent-Message-ID: References: <81378750-7d26-44e0-ae44-7d38bc1ccfc6@www.fastmail.com> <427dea7c-7fd4-4214-9bdc-c344a070e81d@www.fastmail.com> <87d0lfjbay.fsf@cbaines.net> <6c43e48f-c113-4ae4-a131-9b7674671483@www.fastmail.com> From: Christopher Baines In-reply-to: <6c43e48f-c113-4ae4-a131-9b7674671483@www.fastmail.com> Date: Mon, 22 Apr 2019 10:36:24 +0100 Message-ID: <87a7gijs9z.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Alex Griffin Cc: 35346-done@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Alex Griffin writes: > On Sun, Apr 21, 2019, at 9:30 PM, Christopher Baines wrote: >> These changes are looking good, one thing though, is that I think this >> native-search-paths field should be defined for the password-store >> package, as it's the one that uses the search path. >> >> While it works having it defined for pass-otp, having it in the >> password-store package will become relevant if there are more extensions >> packaged for Guix, as then they'll be able to take advantage of this as >> well. > > Thanks Chris, that makes sense. I've attached 2 updated patches with the = requested changes. Great, I've pushed these two patches now, with a few minor changes that'll describe below. > From 8f64805def5352919e4dac57ce0adc79f0243a43 Mon Sep 17 00:00:00 2001 > From: Alex Griffin > Date: Sat, 20 Apr 2019 11:56:23 -0500 > Subject: [PATCH 1/2] gnu: password-store: Allow external packages to prov= ide > extensions. > > * gnu/packages/password-utils.scm (password-store): Add mechanism for > providing pass extensions in separate packages. > [arguments]: Add patch-system-extension-dir phase. > [native-search-paths]: Add PASSWORD_STORE_SYSTEM_EXTENSION_DIR. > --- > gnu/packages/password-utils.scm | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-util= s.scm > index 5c11d8c437..5cd8e2f160 100644 > --- a/gnu/packages/password-utils.scm > +++ b/gnu/packages/password-utils.scm > @@ -6,7 +6,7 @@ > ;;; Copyright =C2=A9 2016 Jessica Tallon > ;;; Copyright =C2=A9 2016 Andreas Enge > ;;; Copyright =C2=A9 2016 Lukas Gradl > -;;; Copyright =C2=A9 2016 Alex Griffin > +;;; Copyright =C2=A9 2016, 2019 Alex Griffin > ;;; Copyright =C2=A9 2017 Leo Famulari > ;;; Copyright =C2=A9 2017, 2018 Cl=C3=A9ment Lassieur > ;;; Copyright =C2=A9 2017, 2018, 2019 Tobias Geerinckx-Rice > @@ -423,6 +423,18 @@ any X11 window.") > (modify-phases %standard-phases > (delete 'configure) > (delete 'build) > + (add-before 'install 'patch-system-extension-dir > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (extension-dir (string-append out "/lib/password-sto= re/extensions"))) > + (substitute* "src/password-store.sh" > + (("^SYSTEM_EXTENSION_DIR=3D.*$") > + ;; lead with whitespace to prevent 'make install' from > + ;; overwriting it again > + (string-append " SYSTEM_EXTENSION_DIR=3D\"" > + "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:= -" > + extension-dir > + "}\"\n")))))) I'm still not quite sure why, but currently it's at least more consistent if phases like the one above evaluate to #t, so I've added #t in at the end. > From 0c695f7ee5151a4c1747591ca165b44c5b9e553b Mon Sep 17 00:00:00 2001 > From: Alex Griffin > Date: Sat, 20 Apr 2019 11:59:35 -0500 > Subject: [PATCH 2/2] gnu: Add pass-otp. > > * gnu/packages/password-utils.scm (pass-otp): New variable. > --- > gnu/packages/password-utils.scm | 49 +++++++++++++++++++++++++++++++++ > 1 file changed, 49 insertions(+) > > diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-util= s.scm > index 5cd8e2f160..fd0a7c6501 100644 > --- a/gnu/packages/password-utils.scm > +++ b/gnu/packages/password-utils.scm ... > + (inputs > + `(("password-store" ,password-store) > + ("expect" ,expect) > + ("oath-toolkit" ,oath-toolkit) > + ("git" ,git) > + ("gnupg" ,gnupg) > + ("which" ,which))) oath-toolkit is the only one of these inputs referenced by the output, so I've changed the others in to native-inputs, as I think this makes a bit more sense. > + (home-page "https://github.com/tadfisher/pass-otp") > + (synopsis "Pass extension for managing one-time-password (OTP) token= s") > + (description " An extension for password-store that allows adding > +one-time-password (OTP) secrets, generating OTP codes, and displaying se= cret > +key URIs using the standard otpauth:// scheme.") I've tweaked the description slightly, removing the space at the start, and making it more of a complete sentence: "Pass OTP is an extension for password-store that allows ..." Thanks again, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAly9ixhfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xc9rw//T0h2cLS8sgs+pxIHccPfuYBYyHPq9royRaUKhSzky0qUoRZon5ZxNfig GqtoY6IRseHdPNnO5TzhAqaTh4w6aaeo45Yjy+4oTdX8XkYCXYF269H67mepOKs5 hlwm8msdeD0uEVubZypBlTGObO1yr14DvI/py/vyDHl8N3s+5wTKzOj5mJ1FR32N 7s6H/xeRnEeh9qxTAKNKnQxsfnjzYtNETo8AFGQdwK3pJRGPBqfTNEFSU5s6zHwz 98zPUzkBnZRKudAriyfBioquaODm26MqO1mnTGQ1+CiNFZuOqvuj3eWXbtT1W+zb p+ik4olNNnhlYpd2g0BYEJ7jmniY7LeS3tQl/4/FqSHDkKpUzYGZa+SCdNdj1b+c R2Jq3RzKom/ApGJZarECA5cye0qg2hbp9w5HU5fCm//zplJlJKoH/YB3DD6OcyQ9 W5auiWSSjKP8Puigi/sFibpIwLWmlQUNYgUq7InKYBIrASLSydrU+iZFzuoH63wZ /yPHqbaR1oR7IbyBRhvka+2RogMMqKW8kYvpICssnIiRLW9NIrW24o9GUbyCctGk eJAERvH8sB37k8WEr6zAdJyhs6Y9iZfQg3r6AG3PXho/qPmaDkdRvVfe6Fh+UoBy Q+8PXpzVVELtLUSqFkVPgkcUGyw4t5CdzNrpp3wm10MPUfiiMmk= =azHy -----END PGP SIGNATURE----- --=-=-=--