unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Alex Griffin" <a@ajgrf.com>
To: 35346@debbugs.gnu.org
Subject: [bug#35346] [PATCH 1/2] gnu: password-store: Allow external packages to provide extensions.
Date: Sat, 20 Apr 2019 13:54:52 -0400	[thread overview]
Message-ID: <53ac7d03-43be-491d-a29e-ad530db4f691@www.fastmail.com> (raw)
In-Reply-To: <81378750-7d26-44e0-ae44-7d38bc1ccfc6@www.fastmail.com>

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

* gnu/packages/password-utils.scm (password-store): Add environment variable
PASSWORD_STORE_SYSTEM_EXTENSION_DIR to support pass extensions in external
packages.
[arguments]: Add patch-system-extension-dir phase.

-- 
Alex Griffin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-password-store-Allow-external-packages-to-provid.patch --]
[-- Type: text/x-patch; name="0001-gnu-password-store-Allow-external-packages-to-provid.patch", Size: 2256 bytes --]

From c927c48cc4bf4dc564bc441d4574dea79c05b472 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Sat, 20 Apr 2019 11:56:23 -0500
Subject: [PATCH 1/2] gnu: password-store: Allow external packages to provide
 extensions.

* gnu/packages/password-utils.scm (password-store): Add environment variable
PASSWORD_STORE_SYSTEM_EXTENSION_DIR to support pass extensions in external
packages.
[arguments]: Add patch-system-extension-dir phase.
---
 gnu/packages/password-utils.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 5c11d8c437..b23dbf1fbb 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se>
 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
-;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2016, 2019 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -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-store/extensions")))
+               (substitute* "src/password-store.sh"
+                 (("^SYSTEM_EXTENSION_DIR=.*$")
+                  ;; lead with whitespace to prevent 'make install' from
+                  ;; overwriting it again
+                  (string-append " SYSTEM_EXTENSION_DIR=\""
+                                 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
+                                 extension-dir
+                                 "}\"\n"))))))
          (add-before 'install 'patch-passmenu-path
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "contrib/dmenu/passmenu"
-- 
2.20.1


  reply	other threads:[~2019-04-20 17:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-20 17:50 [bug#35346] [0/2] Add pass-otp Alex Griffin
2019-04-20 17:54 ` Alex Griffin [this message]
2019-04-20 17:55 ` [bug#35346] [PATCH 2/2] gnu: " Alex Griffin
2019-04-21 21:30   ` Christopher Baines
2019-04-22  0:26     ` Alex Griffin
2019-04-22  9:36       ` bug#35346: " Christopher Baines
2019-04-20 19:59 ` [bug#35346] Add patch tag to #35346 Alex Griffin

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=53ac7d03-43be-491d-a29e-ad530db4f691@www.fastmail.com \
    --to=a@ajgrf.com \
    --cc=35346@debbugs.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).