diff options
author | Alex Griffin <a@ajgrf.com> | 2019-04-20 11:56:23 -0500 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-04-22 10:28:43 +0100 |
commit | 555415564964d82d36db8ee63c00c5d178691830 (patch) | |
tree | 42b8db604c25c1e91452810d9a0ddbf8baddaa5c /gnu | |
parent | c60b15cc6200caa9f67a186548d974dbb83d19aa (diff) | |
download | guix-555415564964d82d36db8ee63c00c5d178691830.tar.gz |
gnu: password-store: Allow external packages to provide 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. Signed-off-by: Christopher Baines <mail@cbaines.net>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/password-utils.scm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index 5c11d8c437..8c5f3dd9e8 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,19 @@ 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")))) + #t)) (add-before 'install 'patch-passmenu-path (lambda* (#:key inputs #:allow-other-keys) (substitute* "contrib/dmenu/passmenu" @@ -461,6 +474,10 @@ any X11 window.") ;; timeout in some circumstances. #:parallel-tests? #f #:test-target "test")) + (native-search-paths + (list (search-path-specification + (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR") + (files '("lib/password-store/extensions"))))) (inputs `(("dmenu" ,dmenu) ("getopt" ,util-linux) |