1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2015 Aljosha Papsch <misc@rpapsch.de>
5 ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
6 ;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se>
7 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
8 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
9 ;;; Copyright © 2016, 2019, 2020 Alex Griffin <a@ajgrf.com>
10 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
11 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
12 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
13 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
14 ;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
15 ;;; Copyright © 2017, 2020-2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
16 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
17 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
18 ;;; Copyright © 2018, 2022 Marius Bakke <marius@gnu.org>
19 ;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
20 ;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net>
21 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
22 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
23 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
24 ;;; Copyright © 2018, 2019, 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
25 ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
26 ;;; Copyright © 2019,2022 Tanguy Le Carrour <tanguy@bioneland.org>
27 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
28 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
29 ;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org>
30 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
31 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
32 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
33 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
34 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
35 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
36 ;;; Copyright © 2021 David Dashyan <mail@davie.li>
38 ;;; This file is part of GNU Guix.
40 ;;; GNU Guix is free software; you can redistribute it and/or modify it
41 ;;; under the terms of the GNU General Public License as published by
42 ;;; the Free Software Foundation; either version 3 of the License, or (at
43 ;;; your option) any later version.
45 ;;; GNU Guix is distributed in the hope that it will be useful, but
46 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
47 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 ;;; GNU General Public License for more details.
50 ;;; You should have received a copy of the GNU General Public License
51 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
53 (define-module (gnu packages password-utils)
54 #:use-module ((guix licenses) #:prefix license:)
55 #:use-module (guix build-system cmake)
56 #:use-module (guix build-system gnu)
57 #:use-module (guix build-system go)
58 #:use-module (guix build-system trivial)
59 #:use-module (guix download)
60 #:use-module (guix gexp)
61 #:use-module (guix git-download)
62 #:use-module (guix packages)
63 #:use-module (gnu packages)
64 #:use-module (gnu packages admin)
65 #:use-module (gnu packages aidc)
66 #:use-module (gnu packages authentication)
67 #:use-module (gnu packages autotools)
68 #:use-module (gnu packages base)
69 #:use-module (gnu packages check)
70 #:use-module (gnu packages compression)
71 #:use-module (gnu packages crypto)
72 #:use-module (gnu packages cryptsetup)
73 #:use-module (gnu packages curl)
74 #:use-module (gnu packages docbook)
75 #:use-module (gnu packages file)
76 #:use-module (gnu packages freedesktop)
77 #:use-module (gnu packages gettext)
78 #:use-module (gnu packages glib)
79 #:use-module (gnu packages gnupg)
80 #:use-module (gnu packages golang)
81 #:use-module (gnu packages gtk)
82 #:use-module (gnu packages guile)
83 #:use-module (gnu packages kerberos)
84 #:use-module (gnu packages libffi)
85 #:use-module (gnu packages libusb)
86 #:use-module (gnu packages linux)
87 #:use-module (gnu packages man)
88 #:use-module (gnu packages multiprecision)
89 #:use-module (gnu packages ncurses)
90 #:use-module (gnu packages nss)
91 #:use-module (gnu packages opencl)
92 #:use-module (gnu packages perl)
93 #:use-module (gnu packages pkg-config)
94 #:use-module (gnu packages python)
95 #:use-module (gnu packages python-web)
96 #:use-module (gnu packages python-xyz)
97 #:use-module (gnu packages readline)
98 #:use-module (gnu packages ruby)
99 #:use-module (gnu packages security-token)
100 #:use-module (gnu packages suckless)
101 #:use-module (gnu packages tcl)
102 #:use-module (gnu packages tls)
103 #:use-module (gnu packages qt)
104 #:use-module (gnu packages version-control)
105 #:use-module (gnu packages wxwidgets)
106 #:use-module (gnu packages xdisorg)
107 #:use-module (gnu packages xorg)
108 #:use-module (gnu packages xml)
109 #:use-module (guix build-system python))
118 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
119 "/pwgen-" version ".tar.gz"))
121 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
122 (build-system gnu-build-system)
124 `(#:tests? #f)) ; no test suite
125 (home-page "http://pwgen.sourceforge.net/")
126 (synopsis "Password generator")
127 (description "Pwgen generates passwords which can be easily memorized by a
129 (license license:gpl2)))
131 (define-public keepassxc
138 (uri (string-append "https://github.com/keepassxreboot/keepassxc"
139 "/releases/download/" version "/keepassxc-"
140 version "-src.tar.xz"))
142 (base32 "1ryk2ndv93jb155cp7qkjm7jd8hjy0v5gqvdvbdidhrmdiibl0b0"))))
143 (build-system cmake-build-system)
146 #:modules '((guix build cmake-build-system)
147 (guix build qt-utils)
149 #:imported-modules `(,@%cmake-build-system-modules
150 (guix build qt-utils))
152 #~(list "-DWITH_XC_ALL=YES"
153 "-DWITH_XC_UPDATECHECK=NO")
155 #~(modify-phases %standard-phases
157 (lambda* (#:key tests? #:allow-other-keys)
159 ;; Fails with "TestCli::testClip() Compared values are not the
160 ;; same". That test also requires a phase with (setenv
161 ;; "QT_QPA_PLATFORM" "offscreen") in order to work.
162 (invoke "ctest" "--exclude-regex" "testcli"))))
163 (add-after 'install 'wrap-qt
164 (lambda* (#:key inputs #:allow-other-keys)
165 (wrap-qt-program "keepassxc" #:output #$output #:inputs inputs))))))
167 (list qttools ruby-asciidoctor))
172 libsodium ; XC_BROWSER
174 libyubikey ; XC_YUBIKEY
183 quazip-0 ; XC_KEESHARE
185 yubikey-personalization ; XC_YUBIKEY
187 (home-page "https://www.keepassxc.org")
188 (synopsis "Password manager")
189 (description "KeePassXC is a password manager or safe which helps you to
190 manage your passwords in a secure way. You can put all your passwords in one
191 database, which is locked with one master key or a key-file which can be stored
192 on an external storage device. The databases are encrypted using the
193 algorithms AES or Twofish.")
195 '((release-monitoring-url . "https://github.com/keepassxreboot/keepassxc/releases")))
196 ;; While various parts of the software are licensed under different licenses,
197 ;; the combined work falls under the GPLv3.
198 (license license:gpl3)))
200 (define-public pwsafe
204 (home-page "https://www.pwsafe.org/")
209 (url "https://github.com/pwsafe/pwsafe")
212 (base32 "0d51dlw98mv23nwb0b5jyji8gnb9f5cnig6kivfljl97lmr6lhvf"))
213 (file-name (git-file-name name version))))
214 (build-system cmake-build-system)
216 `(("gettext" ,gettext-minimal)
217 ("gtest" ,googletest)
220 (inputs `(("curl" ,curl)
222 ("libuuid" ,util-linux "lib")
226 ("qrencode" ,qrencode)
227 ("wxwidgets" ,wxwidgets)
228 ("xerces-c" ,xerces-c)))
229 (arguments '(#:configure-flags (list "-DNO_GTEST=YES")
230 #:phases (modify-phases %standard-phases
231 (add-after 'unpack 'add-gtest
232 (lambda* (#:key inputs #:allow-other-keys)
233 (chmod "CMakeLists.txt" #o644)
234 (let ((cmake-port (open-file "CMakeLists.txt"
236 (display "find_package(GTest)
237 add_subdirectory(src/test)\n" cmake-port)
240 (synopsis "Password safe with automatic input and key generation")
241 (description "pwsafe is a password manager originally designed by Bruce
242 Schneier. It offers a simple UI to manage passwords for different services.
243 There are other programs that support the file format on different
245 (license license:artistic2.0)))
247 (define-public pwsafe-cli
248 (let ((commit "c49a0541b66647ad04d19ddb351d264054c67759")
252 (version (git-version "0.2.0" revision commit))
257 (url "https://github.com/nsd20463/pwsafe")
261 "0ak09r1l7k57m6pdx468hhzvz0szmaq42vyr575fvsjc8rbrp8qq"))
262 (file-name (git-file-name name version))))
263 (build-system gnu-build-system)
265 ;; FIXME: skip failing test suite (requires write access to /tmp),
266 ;; patching path does not help somehow.
269 (modify-phases %standard-phases
273 (invoke "autoheader")
274 (invoke "automake" "--add-missing")
278 (list autoconf automake))
280 (list libx11 libxmu libxt openssl))
281 (home-page "https://github.com/nsd20463/pwsafe")
282 (synopsis "CLI password manager")
284 "@command{pwsafe} is a command line tool compatible with
285 Counterpane's Passwordsafe.")
286 (license license:gpl2+))))
288 (define-public shroud
294 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
298 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
299 (build-system gnu-build-system)
303 `(#:modules ((guix build gnu-build-system)
308 (modify-phases %standard-phases
309 (add-after 'install 'wrap-shroud
310 (lambda* (#:key inputs outputs #:allow-other-keys)
311 (let* ((out (assoc-ref outputs "out"))
312 (guile (assoc-ref inputs "guile"))
313 (effective (read-line
314 (open-pipe* OPEN_READ
315 (string-append guile "/bin/guile")
316 "-c" "(display (effective-version))")))
317 (ccachedir (string-append out
318 "/lib/guile/" effective "/site-ccache"))
319 (prog (string-append out "/bin/shroud")))
321 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
324 (list guile-2.2 gnupg xclip))
325 (synopsis "GnuPG-based secret manager")
326 (description "Shroud is a simple secret manager with a command line
327 interface. The password database is stored as a Scheme s-expression and
328 encrypted with a GnuPG key. Secrets consist of an arbitrary number of
329 key/value pairs, making Shroud suitable for more than just password storage.
330 For copying and pasting secrets into web browsers and other graphical
331 applications, there is xclip integration." )
332 (home-page "https://dthompson.us/projects/shroud.html")
333 (license license:gpl3+)))
342 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
345 (base32 "0hpibsdry259cmvps35isr6jn9cd9fsk3r1h0ppjx9zxfrpqwldg"))))
346 (build-system gnu-build-system)
349 (list (string-append "--docdir=" (assoc-ref %outputs "out")
350 "/share/doc",name "-" ,version))))
352 (list argon2 ncurses openssl))
354 (list cppunit pkg-config))
355 (synopsis "Yet Another Password Encryption Tool")
356 (description "YAPET is a text based password manager using the Blowfish
357 encryption algorithm. Because of its small footprint and very few library
358 dependencies, it is suited for installing on desktop and server systems alike.
359 The text based user interface allows you to run YAPET easily in a Secure Shell
360 session. Two companion utilities enable users to convert CSV files to YAPET
362 (home-page "https://yapet.guengel.ch/")
363 (license license:gpl3+)))
365 (define-public cracklib
372 (uri (string-append "https://github.com/cracklib/cracklib/"
373 "releases/download/v" version "/"
374 "cracklib-" version ".tar.bz2"))
376 (base32 "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py"))))
377 (build-system gnu-build-system)
380 (modify-phases %standard-phases
381 (add-after 'install 'install-dict
382 (lambda* (#:key make-flags #:allow-other-keys)
384 (chmod (string-append "util/cracklib-format") #o755)
385 (apply invoke "make" "dict" make-flags)
387 (synopsis "Password checking library")
388 (home-page "https://github.com/cracklib/cracklib")
390 "CrackLib is a library containing a C function which may be used in a
391 @command{passwd}-like program. The idea is simple: try to prevent users from
392 choosing passwords that could easily be guessed (or \"cracked\") by filtering
393 them out, at the source.")
394 (license license:lgpl2.1)))
396 (define-public libpwquality
398 (name "libpwquality")
403 (string-append "https://github.com/libpwquality/libpwquality"
404 "/releases/download/libpwquality-" version
405 "/libpwquality-" version ".tar.bz2")
406 (string-append "https://launchpad.net/libpwquality/trunk/"
407 version "/+download/"
408 "libpwquality-" version ".tar.bz2")))
411 "0id5a8bi8xnjg11g9vzrl2xbpx65mfxclxcvis7zx1v8vhisyfyl"))))
412 (build-system gnu-build-system)
415 (modify-phases %standard-phases
416 (add-before 'configure 'set-LDFLAGS
417 (lambda* (#:key inputs outputs #:allow-other-keys)
421 (assoc-ref outputs "out") "/lib"))
424 `(("python" ,python-wrapper)))
427 (synopsis "Password quality checker")
428 (home-page "https://github.com/libpwquality/libpwquality")
430 "Libpwquality is a library for password quality checking and generation of
431 random passwords that pass the checks.")
432 (license license:gpl2+)))
434 (define-public assword
442 "http://http.debian.net/debian/pool/main/a/assword/"
443 "assword_" version ".orig.tar.gz")))
446 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
448 `(;; irritatingly, tests do run but not there are two problems:
449 ;; - "import gtk" fails for unknown reasons here despite it the
450 ;; program working (indeed, I've found I have to do a logout and log
451 ;; back in in after an install order for some mumbo jumbo environment
452 ;; variable mess to work with pygtk and assword... what's up with
454 ;; - even when the tests fail, they don't return a nonzero status,
455 ;; so I'm not sure how to programmatically get that information
458 (modify-phases %standard-phases
459 (add-after 'install 'wrap-assword
460 (lambda* (#:key outputs #:allow-other-keys)
461 (let ((prog (string-append
462 (assoc-ref outputs "out")
464 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
466 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
468 (add-after 'install 'manpage
469 (lambda* (#:key outputs #:allow-other-keys)
470 (invoke "make" "assword.1")
473 (string-append (assoc-ref outputs "out") "/share/man/man1")))))))
474 (build-system python-build-system)
478 (list gtk+ python-xdo python-gpg python-pygobject))
481 (home-page "https://finestructure.net/assword/")
482 (synopsis "Password manager")
483 (description "assword is a simple password manager using GPG-wrapped
484 JSON files. It has a command line interface as well as a very simple
485 graphical interface, which can even \"type\" your passwords into
487 (license license:gpl3+)))
489 (define-public password-store
491 (name "password-store")
496 (url "git://git.zx2c4.com/password-store")
500 "17zp9pnb3i9sd2zn9qanngmsywrb7y495ngcqs6313pv3gb83v53"))
501 (patches (search-patches "password-store-tree-compat.patch"))
502 (file-name (git-file-name name version))))
503 (build-system gnu-build-system)
506 (modify-phases %standard-phases
509 (add-before 'install 'patch-system-extension-dir
510 (lambda* (#:key outputs #:allow-other-keys)
511 (let* ((out (assoc-ref outputs "out"))
512 (extension-dir (string-append out "/lib/password-store/extensions")))
513 (substitute* "src/password-store.sh"
514 (("^SYSTEM_EXTENSION_DIR=.*$")
515 ;; lead with whitespace to prevent 'make install' from
516 ;; overwriting it again
517 (string-append " SYSTEM_EXTENSION_DIR=\""
518 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
521 (add-before 'install 'patch-passmenu-path
522 ;; FIXME Wayland support requires ydotool and dmenu-wl packages
523 ;; We are ignoring part of the script that gets executed if
524 ;; WAYLAND_DISPLAY env variable is set, leaving dmenu-wl and ydotool
526 (lambda* (#:key inputs #:allow-other-keys)
527 (substitute* "contrib/dmenu/passmenu"
529 (string-append "dmenu="
530 (search-input-file inputs "/bin/dmenu")
532 (("xdotool=\"xdotool")
533 (string-append "xdotool=\""
534 (search-input-file inputs "/bin/xdotool"))))))
535 (add-after 'install 'install-passmenu
536 (lambda* (#:key outputs #:allow-other-keys)
537 (let* ((out (assoc-ref outputs "out"))
538 (bin (string-append out "/bin")))
539 (install-file "contrib/dmenu/passmenu" bin))))
540 (add-after 'install 'wrap-path
541 (lambda* (#:key inputs outputs #:allow-other-keys)
542 (let* ((out (assoc-ref outputs "out"))
543 (requisites '("getopt" "git" "gpg" "qrencode" "sed"
544 "tree" "which" "wl-copy" "xclip"))
545 (path (map (lambda (pkg)
546 (dirname (search-input-file
547 inputs (string-append "/bin/" pkg))))
549 (wrap-program (string-append out "/bin/pass")
550 `("PATH" ":" prefix (,(string-join path ":"))))))))
551 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
553 (string-append "BASHCOMPDIR="
554 %output "/etc/bash_completion.d"))
555 ;; Parallel tests may cause a race condition leading to a
556 ;; timeout in some circumstances.
558 #:test-target "test"))
560 (list (search-path-specification
561 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
562 (separator #f) ;single entry
563 (files '("lib/password-store/extensions")))))
576 (home-page "https://www.passwordstore.org/")
577 (synopsis "Encrypted password manager")
578 (description "Password-store is a password manager which uses GnuPG to
579 store and retrieve passwords. The tool stores each password in its own
580 GnuPG-encrypted file, allowing the program to be simple yet secure.
581 Synchronization is possible using the integrated git support, which commits
582 changes to your password database to a git repository that can be managed
583 through the pass command.")
584 (license license:gpl2+)))
586 (define-public pass-otp
594 (string-append "https://github.com/tadfisher/pass-otp/releases/"
595 "download/v" version "/pass-otp-" version ".tar.gz"))
598 "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
599 (build-system gnu-build-system)
602 (let* ((out (assoc-ref %outputs "out"))
603 (bashcomp (string-append out "/etc/bash_completion.d")))
604 (list (string-append "PREFIX=" %output)
605 (string-append "BASHCOMPDIR=" bashcomp)))
607 (modify-phases %standard-phases
609 (add-after 'build 'patch-oath-path
610 (lambda* (#:key inputs #:allow-other-keys)
611 (substitute* "otp.bash"
615 (assoc-ref inputs "oath-toolkit")
618 #:test-target "test"))
622 (list password-store expect git gnupg which))
623 (home-page "https://github.com/tadfisher/pass-otp")
624 (synopsis "Pass extension for managing one-time-password (OTP) tokens")
626 "Pass OTP is an extension for password-store that allows adding
627 one-time-password (OTP) secrets, generating OTP codes, and displaying secret
628 key URIs using the standard otpauth:// scheme.")
629 (license license:gpl3+)))
631 (define-public qtpass
639 (url "https://github.com/IJHack/QtPass")
640 (commit (string-append "v" version))))
641 (file-name (git-file-name name version))
644 "0748hjvhjrybi33ci3c8hcr74k9pdrf5jv8npf9hrsrmdyy1kr9x"))))
645 (build-system gnu-build-system)
647 `(#:modules ((guix build gnu-build-system)
648 (guix build qt-utils)
650 #:imported-modules (,@%gnu-build-system-modules
651 (guix build qt-utils))
653 (modify-phases %standard-phases
655 (lambda* (#:key inputs outputs #:allow-other-keys)
656 (let ((out (assoc-ref outputs "out")))
657 ;; lupdate/lrelease need to find qmake.
658 (setenv "QMAKE" "qmake")
659 ;; qmake needs to find lrelease/lupdate.
661 "QMAKE_LRELEASE=lrelease"
662 "QMAKE_LUPDATE=lupdate"
663 (string-append "PREFIX=" out)))))
664 (add-after 'configure 'reset-resource-timestamps
665 ;; Reset timestamps on localization files for a reproducible build.
667 (with-directory-excursion "localization"
668 (for-each (lambda (file)
669 (let* ((base (basename file ".qm"))
670 (src (string-append base ".ts"))
672 (set-file-time file st)))
673 (find-files "." ".*\\.qm")))
675 (add-after 'install 'install-auxilliary
676 ;; Install man-page, icon and .desktop file.
677 (lambda* (#:key inputs outputs #:allow-other-keys)
678 (let* ((out (assoc-ref outputs "out"))
679 (applications (string-append out "/share/applications"))
680 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
681 (man (string-append out "/share/man/man1")))
682 (install-file "qtpass.desktop" applications)
683 (install-file "artwork/icon.svg" icons)
684 (rename-file (string-append icons "/icon.svg")
685 (string-append icons "/qtpass-icon.svg"))
686 (install-file "qtpass.1" man)
688 (add-after 'install 'wrap-qt
689 (lambda* (#:key outputs inputs #:allow-other-keys)
690 (let ((out (assoc-ref outputs "out")))
691 (wrap-qt-program "qtpass" #:output out #:inputs inputs))
693 (add-before 'check 'check-setup
694 ;; Make Qt render "offscreen", required for tests.
696 (setenv "QT_QPA_PLATFORM" "offscreen")
701 (list qtbase-5 qtsvg))
702 (home-page "https://qtpass.org")
703 (synopsis "GUI for password manager password-store")
705 "Qt-based graphical user interface for the password manager
706 password-store also known as pass. Can use either pass or gpg to interact
707 with password-store files. Features configurable password generation,
708 templates, clipboard handling, and per folder settings for multi-recipient
710 (license license:gpl3+)))
712 (define-public rofi-pass
720 (string-append "https://raw.githubusercontent.com/carnager/rofi-pass/"
721 version "/rofi-pass"))
723 (base32 "0msldkndqp40nx1s5s7ggcr97ir4nshpmnyzvj5hqw1l7m3gvw6j"))
725 (build-system trivial-build-system)
727 `(#:modules ((guix build utils))
730 (use-modules (guix build utils))
731 (let ((source (string-append (assoc-ref %build-inputs "source")))
733 (out (assoc-ref %outputs "out")))
734 (copy-file source script)
736 (install-file script (string-append out "/bin"))))))
738 (list password-store rofi xdotool))
739 (home-page "https://github.com/carnager/rofi-pass")
740 (synopsis "Rofi frontend for password-store")
741 (description "Rofi-pass provides a way to manipulate information stored
742 using password-store through rofi interface:
744 @item open URLs of entries with hotkey;
745 @item type any field from entry;
746 @item auto-typing of user and/or password fields;
747 @item auto-typing username based on path;
748 @item auto-typing of more than one field, using the autotype entry;
749 @item bookmarks mode (open stored URLs in browser, default: Alt+x).
751 (license license:gpl3)))
753 (define-public tessen
760 (url "https://github.com/ayushnix/tessen/")
761 (commit (string-append "v" version))))
762 (file-name (git-file-name name version))
765 "1ddsjhzp1qy3jfhxlrzcxgp0gza234yc0sdlngwa3xdj0wr40zs0"))))
766 (build-system gnu-build-system)
771 #~(modify-phases %standard-phases
772 (add-after 'unpack 'patch-wtype-path
773 (lambda* (#:key inputs #:allow-other-keys)
774 (substitute* "tessen"
775 (("wtype") (search-input-file inputs "/bin/wtype")))))
776 (delete 'configure)) ;no configure script
778 #~(list (string-append "PREFIX="
780 (native-inputs (list scdoc))
781 (inputs (list wtype))
782 (home-page "https://github.com/ayushnix/tessen")
783 (synopsis "Frontend for password-store and gopass")
784 (description "Tessen is a bash script that can autotype and copy data
785 from password-store and gopass files.")
786 (license license:gpl2+)))
788 (define-public browserpass-native
790 (name "browserpass-native")
796 (url "https://github.com/browserpass/browserpass-native")
798 (file-name (git-file-name name version))
801 "1jkjslbbac49xjyjkc2b07phdm3i64z40kh6h55cl22dxjmpp1nb"))))
802 (build-system go-build-system)
804 `(#:import-path "github.com/browserpass/browserpass-native"
807 (modify-phases %standard-phases
808 (add-before 'build 'patch-makefile
809 (lambda* (#:key outputs #:allow-other-keys)
810 (let ((out (assoc-ref outputs "out")))
811 ;; This doesn't go in #:make-flags because the Makefile itself
814 "src/github.com/browserpass/browserpass-native/Makefile"
815 (("PREFIX \\?= /usr")
816 (string-append "PREFIX ?= " out)))
818 (add-before 'build 'configure
820 (with-directory-excursion
821 "src/github.com/browserpass/browserpass-native"
822 (invoke "make" "configure"))
826 (with-directory-excursion
827 "src/github.com/browserpass/browserpass-native"
832 (with-directory-excursion
833 "src/github.com/browserpass/browserpass-native"
834 (invoke "make" "install"))
836 (add-after 'install 'wrap-executable
837 (lambda* (#:key inputs outputs #:allow-other-keys)
838 (let ((out (assoc-ref outputs "out"))
839 (gnupg (assoc-ref inputs "gnupg")))
840 (wrap-program (string-append out "/bin/browserpass")
842 (,(string-append gnupg "/bin"))))
847 (list gnupg go-github-com-mattn-go-zglob
848 go-github-com-rifflock-lfshook go-github-com-sirupsen-logrus
849 go-golang-org-x-sys))
850 (home-page "https://github.com/browserpass/browserpass-native")
851 (synopsis "Browserpass native messaging host")
852 (description "Browserpass is a browser extension for pass, a
853 UNIX-based password store manager. It allows you to auto-fill or copy to
854 clipboard credentials for the current domain, protecting you from phishing
857 This package only contains the Browserpass native messaging host. You must
858 also install the browser extension for GNU IceCat or ungoogled-chromium
860 (license license:isc)))
862 (define-public argon2
870 (url "https://github.com/P-H-C/phc-winner-argon2")
872 (file-name (git-file-name name version))
875 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
876 (build-system gnu-build-system)
878 `(#:test-target "test"
879 #:make-flags (list "CC=gcc"
880 (string-append "PREFIX=" (assoc-ref %outputs "out"))
882 (string-append "ARGON2_VERSION=" ,version)
883 "OPTTEST=1") ; disable CPU optimization
885 (modify-phases %standard-phases
886 (delete 'configure)))) ; No configure script.
887 (home-page "https://www.argon2.com/")
888 (synopsis "Password hashing library")
889 (description "Argon2 provides a key derivation function that was declared
890 winner of the 2015 Password Hashing Competition.")
891 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
892 ;; files are CC0 only; see README.md and LICENSE for details.
893 (license (list license:cc0 license:asl2.0))))
895 (define-public pass-git-helper
897 (name "pass-git-helper")
903 (url "https://github.com/languitar/pass-git-helper")
904 (commit (string-append "v" version))))
905 (file-name (git-file-name name version))
908 "18nvwlp0w4aqj268wly60rnjzqw2d8jl0hbs6bkwp3hpzzz5g6yd"))))
909 (build-system python-build-system)
912 (modify-phases %standard-phases
913 (add-before 'build 'patch-pass-path
914 (lambda* (#:key inputs #:allow-other-keys)
915 (let* ((password-store (assoc-ref inputs "password-store"))
916 (pass (string-append password-store "/bin/pass")))
917 (substitute* '("passgithelper.py"
918 "test_passgithelper.py")
919 (("'pass'") (string-append "'" pass "'")))
923 (setenv "HOME" (getcwd))
924 (invoke "pytest"))))))
926 (list python-pyxdg password-store))
928 (list python-pytest python-pytest-mock))
929 (home-page "https://github.com/languitar/pass-git-helper")
930 (synopsis "Git credential helper interfacing with pass")
931 (description "pass-git-helper is a git credential helper which
932 uses pass, the standard unix password manager, as the credential backend for
933 your git repositories. This is achieved by explicitly defining mappings
934 between hosts and entries in the password store.")
935 (license license:lgpl3+)))
937 (define-public john-the-ripper-jumbo
938 (let ((official-version "1.9.0")
941 (name "john-the-ripper-jumbo")
942 (version (string-append official-version "-" jumbo-version))
946 (uri (string-append "http://www.openwall.com/john/j/john-"
947 official-version "-jumbo-" jumbo-version ".tar.xz"))
950 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))))
951 (build-system gnu-build-system)
959 ("python" ,python-2) ; For "python" and "python2" shebangs
960 ("ruby" ,ruby) ; For genincstats.rb
964 (list "--with-systemwide"
965 ;; Do not test for instruction set in configure, and do not
966 ;; pass '-march=native' to gcc:
967 "--disable-native-tests"
968 "--disable-native-march"
971 (let ((system (or (%current-target-system)
974 ((or (string-prefix? "x86_64" system)
975 (string-prefix? "i686" system)) "sse2")
976 ((string-prefix? "aarch" system) "neon")
979 (modify-phases %standard-phases
980 (add-before 'configure 'chdir-src
981 (lambda _ (chdir "src") #t))
984 (let ((bindir (string-append %output "/bin"))
985 (docdir (string-append %output "/share/doc/john"))
986 (execdir (string-append %output "/libexec/john"))
987 (datadir (string-append %output "/share/john"))
988 (install-file-to (lambda (dir)
989 (lambda (f) (install-file f dir))))
990 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
991 (with-directory-excursion "../run"
992 (for-each (install-file-to bindir)
994 "john" "makechr" "cprepair" "SIPdump" "tgtsnarf"
995 "genmkvpwd" "mkvcalcproba" "calc_stat" "raw2dyna"
996 (find-files "." "(to|2)?john(-[^.]*)?$")))
997 (for-each (lambda (f) ; Install symlinked aliases
998 (let ((tgt (string-append bindir "/" (basename f))))
999 ;; The use of install-file above dereferences
1000 ;; symlinks. We'd rather have the symlinks
1001 ;; for clarity, so remove tgt before linking.
1002 (when (file-exists? tgt) (delete-file tgt))
1003 (symlink "john" tgt)))
1004 (find-files "." symlink?))
1005 (for-each (install-file-to execdir)
1006 (cons* "mailer" "benchmark-unify" "relbench"
1007 (find-files "." ".*\\.js")))
1008 (for-each (lambda (f)
1009 (let* ((base (basename f))
1010 (name (substring base 0 (string-index base #\.)))
1011 (link (string-append bindir "/" name)))
1012 (install-file f execdir)
1013 (when (and (executable-file? f)
1014 (not (file-exists? link)))
1015 (symlink (string-append execdir "/" base) link))))
1016 (find-files "." ".*\\.(pl|py|rb|lua)"))
1017 (for-each (install-file-to datadir)
1018 (append (find-files "." "(stats|dictionary.*)")
1019 (find-files "." "(.*\\.chr|.*\\.lst)")
1020 (find-files "." ".*\\.conf")))
1021 (copy-recursively "rules" (string-append datadir "/rules")))
1022 (copy-recursively "../doc" docdir)
1024 (delete 'check) ; Tests need installed .conf files; move after install
1025 (add-after 'install 'check
1027 (setenv "HOME" "/tmp") ; Some tests need to write to ~/.john
1028 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
1029 (apply (assoc-ref %standard-phases 'check) args))))))
1030 (home-page "http://www.openwall.com/john/")
1031 (synopsis "Password cracker")
1032 (description "John the Ripper is a fast password cracker. Its primary
1033 purpose is to detect weak Unix passwords. Besides several @code{crypt}
1034 password hash types most commonly found on various Unix systems, supported out
1035 of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
1036 is the community-enhanced, \"jumbo\" version of John the Ripper.")
1037 (license license:gpl2+))))
1046 (uri (pypi-uri "sala" version))
1049 "13qgmc3i2a0cqp8jqrfl93lnphfagb32pgfikc1gza2a14asxzi8"))))
1050 (build-system python-build-system)
1052 ;; Sala is supposed to work with Python 3.2 or higher,
1053 ;; but it doesn't work with Python 3.6. Better stick
1054 ;; to Python 2, which works fine.
1055 `(#:python ,python-2))
1058 (home-page "http://www.digip.org/sala/")
1059 (synopsis "Encrypted plaintext password store")
1061 "Store passwords and other bits of sensitive plain-text information
1062 to encrypted files on a directory hierarchy. The information is protected
1063 by GnuPG's symmetrical encryption.")
1064 (license license:expat)))
1072 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
1073 version ".tar.bz2"))
1076 "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
1077 (build-system gnu-build-system)
1078 (inputs `(("gtk2" ,gtk+-2)
1080 ("libxml2" ,libxml2)))
1081 (native-inputs (list pkg-config intltool))
1083 `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")
1085 (modify-phases %standard-phases
1086 (add-before 'configure 'pre-configure
1087 ;; The file po/POTFILES.in ends up missing for some reason in
1088 ;; both nix and guix builds. Adding the file with contents
1089 ;; found during troubleshooting.
1091 (call-with-output-file "po/POTFILES.in"
1093 (format port "data/fpm2.desktop.in
1094 data/fpm2.desktop.in.in
1104 (synopsis "Manage, generate and store passwords encrypted")
1105 (description "FPM2 is GTK2 port from Figaro's Password Manager
1106 originally developed by John Conneely, with some new enhancements.
1108 Upstream development seems to have stopped. It is therefore recommended
1109 to use a different password manager.")
1110 (home-page "https://als.regnet.cz/fpm2/")
1111 (license license:gpl2+)))
1113 (define-public pass-rotate
1115 (name "pass-rotate")
1121 (url "https://github.com/ddevault/pass-rotate")
1123 (file-name (git-file-name name version))
1126 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
1127 (build-system python-build-system)
1129 (list python-beautifulsoup4 python-docopt python-html5lib
1131 (home-page "https://github.com/ddevault/pass-rotate")
1132 (synopsis "Rotate password on online services")
1133 (description "pass-rotate is a command line utility and python library for
1134 rotating passwords on various web services. It makes it easier to rotate your
1135 passwords, one at a time or in bulk, when security events or routine upkeep of
1136 your online accounts makes it necessary.")
1137 (license license:expat)))
1139 (define-public hashcat
1146 (uri (string-append "https://hashcat.net/files/hashcat-"
1150 "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r"))))
1152 (list opencl-headers))
1153 (build-system gnu-build-system)
1155 '(#:tests? #f ;no tests
1156 #:make-flags (list (string-append "PREFIX=" %output))
1158 (modify-phases %standard-phases
1159 (delete 'configure))))
1160 (home-page "https://hashcat.net/hashcat/")
1161 (synopsis "Advanced password recovery utility")
1162 (description "Hashcat is an password recovery utility, supporting five
1163 unique modes of attack for over 200 highly-optimized hashing algorithms.
1164 Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
1165 Linux, Windows, and macOS, and has facilities to help enable distributed
1166 password cracking.")
1167 (license license:expat)))
1169 (define-public hashcat-utils
1171 (name "hashcat-utils")
1176 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
1177 "download/v" version "/"
1178 "hashcat-utils-" version ".7z"))
1180 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
1185 (build-system gnu-build-system)
1187 `(#:tests? #f ;no tests
1188 #:make-flags (list "CC=gcc"
1189 ;; Upstream bug(?): "make all" seems to remove the
1190 ;; Perl scripts from the source.
1193 (modify-phases %standard-phases
1195 (lambda* (#:key source #:allow-other-keys)
1196 (invoke "7z" "x" source)
1197 (chdir (string-append "hashcat-utils-" ,version "/src"))
1201 (lambda* (#:key outputs #:allow-other-keys)
1202 (let ((out (string-append (assoc-ref outputs "out") "/bin")))
1206 (copy-file file (string-append out "/"
1207 (basename file ".bin"))))
1208 (find-files "." "\\.bin$"))
1211 (copy-file file (string-append out "/"
1212 (basename file ".pl"))))
1213 (find-files "../bin" "\\.pl$"))
1215 (home-page "https://github.com/hashcat/hashcat-utils/")
1216 (synopsis "Small utilities that are useful in advanced password cracking")
1217 (description "Hashcat-utils are a set of small utilities that are useful
1218 in advanced password cracking. They all are packed into multiple stand-alone
1219 binaries. All of these utils are designed to execute only one specific
1220 function. Since they all work with @code{STDIN} and @code{STDOUT} you can
1221 group them into chains.")
1222 (license license:expat)))
1224 (define-public bruteforce-luks
1226 (name "bruteforce-luks")
1231 (uri (string-append "https://github.com/glv2/bruteforce-luks/releases/download/"
1237 (base32 "0yawrlbbklhmvwr99wm7li3r0d5kxvpkwf33a12rji7z0ya5p340"))))
1238 (build-system gnu-build-system)
1243 (synopsis "LUKS encrypted volume cracker")
1245 "This is a cracker for LUKS encrypted volumes. It can be used either in
1246 exhaustive mode to try every password given a charset or in dictionary mode to
1247 try every password contained in a file.")
1248 (home-page "https://github.com/glv2/bruteforce-luks")
1249 (license license:gpl3+)))
1251 (define-public makepasswd
1252 (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
1256 (version (git-version "0.5.4" revision commit))
1261 (url "https://github.com/khorben/makepasswd")
1263 (file-name (git-file-name name version))
1265 (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
1266 (build-system gnu-build-system)
1268 (list pkg-config libxslt libxml2 docbook-xsl docbook-xml))
1273 (modify-phases %standard-phases
1274 (delete 'configure))
1275 #:make-flags (list "CC=gcc"
1276 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1277 #:tests? #f)) ;no tests
1278 (synopsis "Generate (pseudo-)random passwords and hashes")
1280 "Makepasswd is a program that generates pseudo-random passwords of a
1281 desired length. It can also generate their corresponding hashes for a given
1282 encryption algorithm if so desired.")
1283 (home-page "https://github.com/khorben/makepasswd")
1284 (license license:gpl3))))
1286 (define-public pass-tomb
1294 (url "https://github.com/roddhjav/pass-tomb")
1295 (commit (string-append "v" version))))
1296 (file-name (git-file-name name version))
1298 (base32 "1qj7vx7svk1ljwihj3kv310k17mafnf919n30n4qn1yxmmsvj924"))))
1299 (build-system gnu-build-system)
1302 (let ((out (assoc-ref %outputs "out")))
1303 (list (string-append "PREFIX=" out)
1304 (string-append "BASHCOMPDIR=" out "/etc/bash_completion.d")))
1305 #:test-target "tests"
1306 ;; tests are very dependent on system state (swap partition) and require
1307 ;; access to /tmp/zsh which is not in the build container.
1310 (modify-phases %standard-phases
1311 (add-after 'unpack 'set-tomb-path
1312 (lambda* (#:key inputs #:allow-other-keys)
1313 (let ((tomb (assoc-ref inputs "tomb")))
1314 (substitute* "tomb.bash"
1316 (string-append ":-" tomb "/bin/tomb"))))))
1317 (delete 'configure))))
1320 (home-page "https://github.com/roddhjav/pass-tomb")
1321 (synopsis "Pass extension keeping the tree of passwords encrypted")
1322 (description "Pass-tomb provides a convenient solution to put your
1323 password store in a Tomb and then keep your password tree encrypted when you
1324 are not using it. It uses the same GPG key to encrypt passwords and tomb,
1325 therefore you don't need to manage more key or secret. Moreover, you can ask
1326 pass-tomb to automatically close your store after a given time.")
1327 (license license:gpl3+)))