summaryrefslogtreecommitdiff
path: root/gnu/packages/password-utils.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/password-utils.scm')
-rw-r--r--gnu/packages/password-utils.scm72
1 files changed, 70 insertions, 2 deletions
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index ad89cee5a8..b238d39a70 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>
@@ -48,6 +48,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages aidc)
+ #:use-module (gnu packages authentication)
#:use-module (gnu packages base)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
@@ -58,7 +59,6 @@
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
- #:use-module (gnu packages gnuzilla)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages kerberos)
@@ -67,6 +67,7 @@
#:use-module (gnu packages man)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages nss)
#:use-module (gnu packages opencl)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
@@ -74,6 +75,7 @@
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages suckless)
+ #:use-module (gnu packages tcl)
#:use-module (gnu packages tls)
#:use-module (gnu packages qt)
#:use-module (gnu packages version-control)
@@ -423,6 +425,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 +476,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)
@@ -482,6 +501,55 @@ changes to your password database to a git repository that can be managed
through the pass command.")
(license license:gpl2+)))
+(define-public pass-otp
+ (package
+ (name "pass-otp")
+ (version "1.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://github.com/tadfisher/pass-otp/releases/"
+ "download/v" version "/pass-otp-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags
+ (let* ((out (assoc-ref %outputs "out"))
+ (bashcomp (string-append out "/etc/bash_completion.d")))
+ (list (string-append "PREFIX=" %output)
+ (string-append "BASHCOMPDIR=" bashcomp)))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'build 'patch-oath-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "otp.bash"
+ (("^OATH=.*$")
+ (string-append
+ "OATH="
+ (assoc-ref inputs "oath-toolkit")
+ "/bin/oathtool\n")))
+ #t)))
+ #:test-target "test"))
+ (inputs
+ `(("oath-toolkit" ,oath-toolkit)))
+ (native-inputs
+ `(("password-store" ,password-store)
+ ("expect" ,expect)
+ ("git" ,git)
+ ("gnupg" ,gnupg)
+ ("which" ,which)))
+ (home-page "https://github.com/tadfisher/pass-otp")
+ (synopsis "Pass extension for managing one-time-password (OTP) tokens")
+ (description
+ "Pass OTP is an extension for password-store that allows adding
+one-time-password (OTP) secrets, generating OTP codes, and displaying secret
+key URIs using the standard otpauth:// scheme.")
+ (license license:gpl3+)))
+
(define-public argon2
(package
(name "argon2")