1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
3 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2015 Aljosha Papsch <misc@rpapsch.de>
5 ;;; Copyright © 2016 Christopher Allan 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, 2018, 2019 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 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 Marius Bakke <mbakke@fastmail.com>
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 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
25 ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
26 ;;; Copyright © 2019 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>
31 ;;; This file is part of GNU Guix.
33 ;;; GNU Guix is free software; you can redistribute it and/or modify it
34 ;;; under the terms of the GNU General Public License as published by
35 ;;; the Free Software Foundation; either version 3 of the License, or (at
36 ;;; your option) any later version.
38 ;;; GNU Guix is distributed in the hope that it will be useful, but
39 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
40 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41 ;;; GNU General Public License for more details.
43 ;;; You should have received a copy of the GNU General Public License
44 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
46 (define-module (gnu packages password-utils)
47 #:use-module ((guix licenses) #:prefix license:)
48 #:use-module (guix build-system cmake)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system go)
51 #:use-module (guix build-system trivial)
52 #:use-module (guix download)
53 #:use-module (guix git-download)
54 #:use-module (guix packages)
55 #:use-module (gnu packages)
56 #:use-module (gnu packages admin)
57 #:use-module (gnu packages aidc)
58 #:use-module (gnu packages authentication)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages check)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages crypto)
63 #:use-module (gnu packages cryptsetup)
64 #:use-module (gnu packages curl)
65 #:use-module (gnu packages docbook)
66 #:use-module (gnu packages file)
67 #:use-module (gnu packages freedesktop)
68 #:use-module (gnu packages gettext)
69 #:use-module (gnu packages glib)
70 #:use-module (gnu packages gnupg)
71 #:use-module (gnu packages golang)
72 #:use-module (gnu packages gtk)
73 #:use-module (gnu packages guile)
74 #:use-module (gnu packages kerberos)
75 #:use-module (gnu packages libffi)
76 #:use-module (gnu packages linux)
77 #:use-module (gnu packages man)
78 #:use-module (gnu packages multiprecision)
79 #:use-module (gnu packages ncurses)
80 #:use-module (gnu packages nss)
81 #:use-module (gnu packages opencl)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages python)
85 #:use-module (gnu packages python-web)
86 #:use-module (gnu packages python-xyz)
87 #:use-module (gnu packages readline)
88 #:use-module (gnu packages ruby)
89 #:use-module (gnu packages security-token)
90 #:use-module (gnu packages suckless)
91 #:use-module (gnu packages tcl)
92 #:use-module (gnu packages tls)
93 #:use-module (gnu packages qt)
94 #:use-module (gnu packages version-control)
95 #:use-module (gnu packages wxwidgets)
96 #:use-module (gnu packages xdisorg)
97 #:use-module (gnu packages xorg)
98 #:use-module (gnu packages xml)
99 #:use-module (guix build-system python))
108 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
109 "/pwgen-" version ".tar.gz"))
111 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
112 (build-system gnu-build-system)
114 `(#:tests? #f)) ; no test suite
115 (home-page "http://pwgen.sourceforge.net/")
116 (synopsis "Password generator")
117 (description "Pwgen generates passwords which can be easily memorized by a
119 (license license:gpl2)))
121 (define-public keepassxc
128 (uri (string-append "https://github.com/keepassxreboot/keepassxc"
129 "/releases/download/" version "/keepassxc-"
130 version "-src.tar.xz"))
132 (base32 "0jndssyvpl8bc5i2q3d6kq1ppynchxx9nvp1qhd2pc0qqc0hhpm5"))))
133 (build-system cmake-build-system)
135 '(#:configure-flags '("-DWITH_XC_ALL=YES"
136 "-DWITH_XC_UPDATECHECK=NO")))
139 ("libgcrypt" ,libgcrypt)
140 ("libsodium" ,libsodium) ; XC_BROWSER
141 ("libyubikey" ,libyubikey) ; XC_YUBIKEY
144 ("qrencode" ,qrencode)
147 ("qtx11extras" ,qtx11extras)
148 ("quazip" ,quazip) ; XC_KEESHARE
149 ("readline" ,readline)
150 ("yubikey-personalization" ,yubikey-personalization) ; XC_YUBIKEY
153 `(("qttools" ,qttools)))
154 (home-page "https://www.keepassxc.org")
155 (synopsis "Password manager")
156 (description "KeePassXC is a password manager or safe which helps you to
157 manage your passwords in a secure way. You can put all your passwords in one
158 database, which is locked with one master key or a key-file which can be stored
159 on an external storage device. The databases are encrypted using the
160 algorithms AES or Twofish.")
161 ;; While various parts of the software are licensed under different licenses,
162 ;; the combined work falls under the GPLv3.
163 (license license:gpl3)))
165 (define-public keepassx
172 (uri (string-append "https://www.keepassx.org/releases/" version
173 "/keepassx-" version ".tar.gz"))
176 "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
177 (build-system cmake-build-system)
179 `(("libgcrypt" ,libgcrypt)
185 (home-page "https://www.keepassx.org")
186 (synopsis "Password manager")
187 (description "KeePassX is a password manager or safe which helps you to
188 manage your passwords in a secure way. You can put all your passwords in one
189 database, which is locked with one master key or a key-file which can be stored
190 on an external storage device. The databases are encrypted using the
191 algorithms AES or Twofish.")
192 ;; Non functional parts use various licences.
193 (license license:gpl3)
194 (properties `((superseded . ,keepassxc)))))
196 (define-public pwsafe
200 (home-page "https://www.pwsafe.org/")
205 (url "https://github.com/pwsafe/pwsafe.git")
208 (base32 "01kfssd2vr64yh4dqhch58x36n3aj3hpj5n560f41rsxym69c6qs"))
209 (file-name (git-file-name name version))))
210 (build-system cmake-build-system)
212 `(("gettext" ,gettext-minimal)
213 ("gtest" ,googletest)
216 (inputs `(("curl" ,curl)
218 ("libuuid" ,util-linux)
222 ("qrencode" ,qrencode)
223 ("wxwidgets" ,wxwidgets)
224 ("xerces-c" ,xerces-c)))
225 (arguments '(#:configure-flags (list "-DNO_GTEST=YES")
226 #:phases (modify-phases %standard-phases
227 (add-after 'unpack 'add-gtest
228 (lambda* (#:key inputs #:allow-other-keys)
229 (chmod "CMakeLists.txt" #o644)
230 (let ((cmake-port (open-file "CMakeLists.txt"
232 (display "find_package(GTest)
233 add_subdirectory(src/test)\n" cmake-port)
236 (add-after 'add-gtest 'patch-executables
237 (lambda* (#:key inputs #:allow-other-keys)
238 (chmod "src/test/OSTest.cpp" #o644)
239 (substitute* "src/os/unix/media.cpp"
241 (string-append (assoc-ref inputs "file")
244 (synopsis "Password safe with automatic input and key generation")
245 (description "pwsafe is a password manager originally designed by Bruce
246 Schneier. It offers a simple UI to manage passwords for different services.
247 There are other programs that support the file format on different
249 (license license:artistic2.0)))
251 (define-public shroud
257 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
261 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
262 (build-system gnu-build-system)
264 `(("pkg-config" ,pkg-config)))
266 `(#:modules ((guix build gnu-build-system)
271 (modify-phases %standard-phases
272 (add-after 'install 'wrap-shroud
273 (lambda* (#:key inputs outputs #:allow-other-keys)
274 (let* ((out (assoc-ref outputs "out"))
275 (guile (assoc-ref inputs "guile"))
276 (effective (read-line
277 (open-pipe* OPEN_READ
278 (string-append guile "/bin/guile")
279 "-c" "(display (effective-version))")))
280 (ccachedir (string-append out
281 "/lib/guile/" effective "/site-ccache"))
282 (prog (string-append out "/bin/shroud")))
284 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
287 `(("guile" ,guile-2.2)
290 (synopsis "GnuPG-based secret manager")
291 (description "Shroud is a simple secret manager with a command line
292 interface. The password database is stored as a Scheme s-expression and
293 encrypted with a GnuPG key. Secrets consist of an arbitrary number of
294 key/value pairs, making Shroud suitable for more than just password storage.
295 For copying and pasting secrets into web browsers and other graphical
296 applications, there is xclip integration." )
297 (home-page "https://dthompson.us/projects/shroud.html")
298 (license license:gpl3+)))
307 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
310 (base32 "1fl4s7v1psl52ndd6i7716i9f493aj8ipl6lgmraadnn5h26l3pm"))))
311 (build-system gnu-build-system)
315 ("openssl" ,openssl)))
317 `(("cppunit" ,cppunit)
318 ("pkg-config" ,pkg-config)))
319 (synopsis "Yet Another Password Encryption Tool")
320 (description "YAPET is a text based password manager using the Blowfish
321 encryption algorithm. Because of its small footprint and very few library
322 dependencies, it is suited for installing on desktop and server systems alike.
323 The text based user interface allows you to run YAPET easily in a Secure Shell
324 session. Two companion utilities enable users to convert CSV files to YAPET
326 (home-page "https://yapet.guengel.ch/")
327 (license license:gpl3+)))
329 (define-public cracklib
336 (uri (string-append "https://github.com/cracklib/cracklib/"
337 "releases/download/v" version "/"
338 "cracklib-" version ".tar.bz2"))
340 (base32 "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py"))))
341 (build-system gnu-build-system)
344 (modify-phases %standard-phases
345 (add-after 'install 'install-dict
346 (lambda* (#:key make-flags #:allow-other-keys)
348 (chmod (string-append "util/cracklib-format") #o755)
349 (apply invoke "make" "dict" make-flags)
351 (synopsis "Password checking library")
352 (home-page "https://github.com/cracklib/cracklib")
354 "CrackLib is a library containing a C function which may be used in a
355 @command{passwd}-like program. The idea is simple: try to prevent users from
356 choosing passwords that could easily be guessed (or \"cracked\") by filtering
357 them out, at the source.")
358 (license license:lgpl2.1)))
360 (define-public libpwquality
362 (name "libpwquality")
367 (string-append "https://github.com/libpwquality/libpwquality"
368 "/releases/download/libpwquality-" version
369 "/libpwquality-" version ".tar.bz2")
370 (string-append "https://launchpad.net/libpwquality/trunk/"
371 version "/+download/"
372 "libpwquality-" version ".tar.bz2")))
375 "13hw532fmzc5xjpy75d74rlfdlxf2a8ibb4hyy9c0s92wsgf0qsj"))))
376 (build-system gnu-build-system)
378 ;; XXX: have RUNPATH issue.
379 '(#:configure-flags '("--disable-python-bindings")))
381 `(("cracklib" ,cracklib)))
382 (synopsis "Password quality checker")
383 (home-page "https://github.com/libpwquality/libpwquality")
385 "Libpwquality is a library for password quality checking and generation of
386 random passwords that pass the checks.")
387 (license license:gpl2+)))
389 (define-public assword
397 "http://http.debian.net/debian/pool/main/a/assword/"
398 "assword_" version ".orig.tar.gz")))
401 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
403 `(;; irritatingly, tests do run but not there are two problems:
404 ;; - "import gtk" fails for unknown reasons here despite it the
405 ;; program working (indeed, I've found I have to do a logout and log
406 ;; back in in after an install order for some mumbo jumbo environment
407 ;; variable mess to work with pygtk and assword... what's up with
409 ;; - even when the tests fail, they don't return a nonzero status,
410 ;; so I'm not sure how to programmatically get that information
413 (modify-phases %standard-phases
414 (add-after 'install 'wrap-assword
415 (lambda* (#:key outputs #:allow-other-keys)
416 (let ((prog (string-append
417 (assoc-ref outputs "out")
419 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
421 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
423 (add-after 'install 'manpage
424 (lambda* (#:key outputs #:allow-other-keys)
425 ;; Without this substitution, it fails with
426 ;; ImportError: No module named 'gpg'
427 (substitute* "Makefile"
428 (("PYTHONPATH=.") ""))
429 (invoke "make" "assword.1")
432 (string-append (assoc-ref outputs "out") "/share/man/man1")))))))
433 (build-system python-build-system)
435 `(("txt2man" ,txt2man)))
438 ("python-xdo" ,python-xdo)
439 ("python-gpg" ,python-gpg)
440 ("python-pygobject" ,python-pygobject)))
443 (home-page "https://finestructure.net/assword/")
444 (synopsis "Password manager")
445 (description "assword is a simple password manager using GPG-wrapped
446 JSON files. It has a command line interface as well as a very simple
447 graphical interface, which can even \"type\" your passwords into
449 (license license:gpl3+)))
451 (define-public password-store
453 (name "password-store")
458 (string-append "https://git.zx2c4.com/password-store/snapshot/"
459 name "-" version ".tar.xz"))
462 "1x53k5dn3cdmvy8m4fqdld4hji5n676ksl0ql4armkmsds26av1b"))))
463 (build-system gnu-build-system)
466 (modify-phases %standard-phases
469 (add-before 'install 'patch-system-extension-dir
470 (lambda* (#:key outputs #:allow-other-keys)
471 (let* ((out (assoc-ref outputs "out"))
472 (extension-dir (string-append out "/lib/password-store/extensions")))
473 (substitute* "src/password-store.sh"
474 (("^SYSTEM_EXTENSION_DIR=.*$")
475 ;; lead with whitespace to prevent 'make install' from
476 ;; overwriting it again
477 (string-append " SYSTEM_EXTENSION_DIR=\""
478 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
482 (add-before 'install 'patch-passmenu-path
483 (lambda* (#:key inputs #:allow-other-keys)
484 (substitute* "contrib/dmenu/passmenu"
485 (("dmenu") (string-append (assoc-ref inputs "dmenu")
487 (("xdotool") (string-append (assoc-ref inputs "xdotool")
490 (add-after 'install 'install-passmenu
491 (lambda* (#:key outputs #:allow-other-keys)
492 (let* ((out (assoc-ref outputs "out"))
493 (bin (string-append out "/bin")))
494 (install-file "contrib/dmenu/passmenu" bin)
496 (add-after 'install 'wrap-path
497 (lambda* (#:key inputs outputs #:allow-other-keys)
498 (let ((out (assoc-ref outputs "out"))
499 (path (map (lambda (pkg)
500 (string-append (assoc-ref inputs pkg) "/bin"))
501 '("coreutils" "getopt" "git" "gnupg" "qrencode"
502 "sed" "tree" "which" "xclip"))))
503 (wrap-program (string-append out "/bin/pass")
504 `("PATH" ":" prefix (,(string-join path ":"))))
506 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
508 (string-append "BASHCOMPDIR="
509 %output "/etc/bash_completion.d"))
510 ;; Parallel tests may cause a race condition leading to a
511 ;; timeout in some circumstances.
513 #:test-target "test"))
515 (list (search-path-specification
516 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
517 (separator #f) ;single entry
518 (files '("lib/password-store/extensions")))))
521 ("getopt" ,util-linux)
524 ("qrencode" ,qrencode)
529 ("xdotool" ,xdotool)))
530 (home-page "https://www.passwordstore.org/")
531 (synopsis "Encrypted password manager")
532 (description "Password-store is a password manager which uses GnuPG to
533 store and retrieve passwords. The tool stores each password in its own
534 GnuPG-encrypted file, allowing the program to be simple yet secure.
535 Synchronization is possible using the integrated git support, which commits
536 changes to your password database to a git repository that can be managed
537 through the pass command.")
538 (license license:gpl2+)))
540 (define-public pass-otp
548 (string-append "https://github.com/tadfisher/pass-otp/releases/"
549 "download/v" version "/pass-otp-" version ".tar.gz"))
552 "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
553 (build-system gnu-build-system)
556 (let* ((out (assoc-ref %outputs "out"))
557 (bashcomp (string-append out "/etc/bash_completion.d")))
558 (list (string-append "PREFIX=" %output)
559 (string-append "BASHCOMPDIR=" bashcomp)))
561 (modify-phases %standard-phases
563 (add-after 'build 'patch-oath-path
564 (lambda* (#:key inputs #:allow-other-keys)
565 (substitute* "otp.bash"
569 (assoc-ref inputs "oath-toolkit")
572 #:test-target "test"))
574 `(("oath-toolkit" ,oath-toolkit)))
576 `(("password-store" ,password-store)
581 (home-page "https://github.com/tadfisher/pass-otp")
582 (synopsis "Pass extension for managing one-time-password (OTP) tokens")
584 "Pass OTP is an extension for password-store that allows adding
585 one-time-password (OTP) secrets, generating OTP codes, and displaying secret
586 key URIs using the standard otpauth:// scheme.")
587 (license license:gpl3+)))
589 (define-public qtpass
597 (url "https://github.com/IJHack/QtPass.git")
598 (commit (string-append "v" version))))
599 (file-name (git-file-name name version))
602 "1vfhfyccrxq9snyvayqfzm5rqik8ny2gysyv7nipc91kvhq3bhky"))))
603 (build-system gnu-build-system)
606 (modify-phases %standard-phases
608 (lambda* (#:key inputs outputs #:allow-other-keys)
609 (let ((out (assoc-ref outputs "out")))
610 ;; lupdate/lrelease need to find qmake.
611 (setenv "QMAKE" "qmake")
612 ;; qmake needs to find lrelease/lupdate.
614 "QMAKE_LRELEASE=lrelease"
615 "QMAKE_LUPDATE=lupdate"
616 (string-append "PREFIX=" out)))))
617 (add-after 'configure 'reset-resource-timestamps
618 ;; Reset timestamps on localization files for a reproducible build.
620 (with-directory-excursion "localization"
621 (for-each (lambda (file)
622 (let* ((base (basename file ".qm"))
623 (src (string-append base ".ts"))
625 (set-file-time file st)))
626 (find-files "." ".*\\.qm")))
628 (add-after 'install 'install-auxilliary
629 ;; Install man-page, icon and .desktop file.
630 (lambda* (#:key inputs outputs #:allow-other-keys)
631 (let* ((out (assoc-ref outputs "out"))
632 (applications (string-append out "/share/applications"))
633 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
634 (man (string-append out "/share/man/man1")))
635 (install-file "qtpass.desktop" applications)
636 (install-file "artwork/icon.svg" icons)
637 (rename-file (string-append icons "/icon.svg")
638 (string-append icons "/qtpass-icon.svg"))
639 (install-file "qtpass.1" man)
641 (add-before 'check 'check-setup
642 ;; Make Qt render "offscreen", required for tests.
644 (setenv "QT_QPA_PLATFORM" "offscreen")
647 `(("qttools" ,qttools)))
651 (home-page "https://qtpass.org")
652 (synopsis "GUI for password manager password-store")
654 "Qt-based graphical user interface for the password manager
655 password-store also known as pass. Can use either pass or gpg to interact
656 with password-store files. Features configurable password generation,
657 templates, clipboard handling, and per folder settings for multi-recipient
659 (license license:gpl3+)))
661 (define-public rofi-pass
669 (string-append "https://raw.githubusercontent.com/carnager/rofi-pass/"
670 version "/rofi-pass"))
672 (base32 "0msldkndqp40nx1s5s7ggcr97ir4nshpmnyzvj5hqw1l7m3gvw6j"))
674 (build-system trivial-build-system)
676 `(#:modules ((guix build utils))
679 (use-modules (guix build utils))
680 (let ((source (string-append (assoc-ref %build-inputs "source")))
682 (out (assoc-ref %outputs "out")))
683 (copy-file source script)
685 (install-file script (string-append out "/bin"))))))
687 `(("password-store" ,password-store)
689 ("xdotool" ,xdotool)))
690 (home-page "https://github.com/carnager/rofi-pass")
691 (synopsis "Rofi frontend for password-store")
692 (description "Rofi-pass provides a way to manipulate information stored
693 using password-store through rofi interface:
695 @item open URLs of entries with hotkey;
696 @item type any field from entry;
697 @item auto-typing of user and/or password fields;
698 @item auto-typing username based on path;
699 @item auto-typing of more than one field, using the autotype entry;
700 @item bookmarks mode (open stored URLs in browser, default: Alt+x).
702 (license license:gpl3)))
704 (define-public browserpass-native
706 (name "browserpass-native")
712 (url "https://github.com/browserpass/browserpass-native.git")
714 (file-name (git-file-name name version))
717 "0q3bsla07zjl6i69nj1axbkg2ia89pvh0jg6nlqgbm2kpzzbn0pz"))))
718 (build-system go-build-system)
720 `(#:import-path "github.com/browserpass/browserpass-native"
723 (modify-phases %standard-phases
724 (add-before 'build 'patch-makefile
725 (lambda* (#:key outputs #:allow-other-keys)
726 (let ((out (assoc-ref outputs "out")))
727 ;; This doesn't go in #:make-flags because the Makefile itself
730 "src/github.com/browserpass/browserpass-native/Makefile"
731 (("PREFIX \\?= /usr")
732 (string-append "PREFIX ?= " out)))
734 (add-before 'build 'configure
736 (with-directory-excursion
737 "src/github.com/browserpass/browserpass-native"
738 (invoke "make" "configure"))
742 (with-directory-excursion
743 "src/github.com/browserpass/browserpass-native"
748 (with-directory-excursion
749 "src/github.com/browserpass/browserpass-native"
750 (invoke "make" "install"))
752 (add-after 'install 'wrap-executable
753 (lambda* (#:key inputs outputs #:allow-other-keys)
754 (let ((out (assoc-ref outputs "out"))
755 (gnupg (assoc-ref inputs "gnupg")))
756 (wrap-program (string-append out "/bin/browserpass")
758 (,(string-append gnupg "/bin"))))
764 ("go-github-com-mattn-go-zglob" ,go-github-com-mattn-go-zglob)
765 ("go-github-com-rifflock-lfshook" ,go-github-com-rifflock-lfshook)
766 ("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)
767 ("go-golang-org-x-sys" ,go-golang-org-x-sys)))
768 (home-page "https://github.com/browserpass/browserpass-native")
769 (synopsis "Browserpass native messaging host")
770 (description "Browserpass is a browser extension for pass, a
771 UNIX-based password store manager. It allows you to auto-fill or copy to
772 clipboard credentials for the current domain, protecting you from phishing
775 This package only contains the Browserpass native messaging host. You must
776 also install the browser extension for GNU IceCat or ungoogled-chromium
778 (license license:isc)))
780 (define-public argon2
788 (url "https://github.com/P-H-C/phc-winner-argon2")
790 (file-name (git-file-name name version))
793 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
794 (build-system gnu-build-system)
796 `(#:test-target "test"
797 #:make-flags (list "CC=gcc"
798 (string-append "PREFIX=" (assoc-ref %outputs "out"))
800 (string-append "ARGON2_VERSION=" ,version)
801 "OPTTEST=1") ; disable CPU optimization
803 (modify-phases %standard-phases
804 (delete 'configure)))) ; No configure script.
805 (home-page "https://www.argon2.com/")
806 (synopsis "Password hashing library")
807 (description "Argon2 provides a key derivation function that was declared
808 winner of the 2015 Password Hashing Competition.")
809 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
810 ;; files are CC0 only; see README.md and LICENSE for details.
811 (license (list license:cc0 license:asl2.0))))
813 (define-public pass-git-helper
815 (name "pass-git-helper")
821 (url "https://github.com/languitar/pass-git-helper")
822 (commit (string-append "v" version))))
823 (file-name (git-file-name name version))
826 "18nvwlp0w4aqj268wly60rnjzqw2d8jl0hbs6bkwp3hpzzz5g6yd"))))
827 (build-system python-build-system)
830 (modify-phases %standard-phases
831 (add-before 'build 'patch-pass-path
832 (lambda* (#:key inputs #:allow-other-keys)
833 (let* ((password-store (assoc-ref inputs "password-store"))
834 (pass (string-append password-store "/bin/pass")))
835 (substitute* '("passgithelper.py"
836 "test_passgithelper.py")
837 (("'pass'") (string-append "'" pass "'")))
841 (setenv "HOME" (getcwd))
842 (invoke "pytest"))))))
844 `(("python-pyxdg" ,python-pyxdg)
845 ("password-store" ,password-store)))
847 `(("python-pytest" ,python-pytest)
848 ("python-pytest-mock" ,python-pytest-mock)))
849 (home-page "https://github.com/languitar/pass-git-helper")
850 (synopsis "Git credential helper interfacing with pass")
851 (description "pass-git-helper is a git credential helper which
852 uses pass, the standard unix password manager, as the credential backend for
853 your git repositories. This is achieved by explicitly defining mappings
854 between hosts and entries in the password store.")
855 (license license:lgpl3+)))
857 (define-public john-the-ripper-jumbo
858 (let ((official-version "1.9.0")
861 (name "john-the-ripper-jumbo")
862 (version (string-append official-version "-" jumbo-version))
866 (uri (string-append "http://www.openwall.com/john/j/john-"
867 official-version "-jumbo-" jumbo-version ".tar.xz"))
870 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))))
871 (build-system gnu-build-system)
878 ("openssl" ,openssl-1.0)
879 ("python" ,python-2) ; For "python" and "python2" shebangs
880 ("ruby" ,ruby) ; For genincstats.rb
884 (list "--with-systemwide"
885 ;; Do not test for instruction set in configure, and do not
886 ;; pass '-march=native' to gcc:
887 "--disable-native-tests"
888 "--disable-native-march"
891 (let ((system (or (%current-target-system)
894 ((or (string-prefix? "x86_64" system)
895 (string-prefix? "i686" system)) "sse2")
896 ((string-prefix? "aarch" system) "neon")
899 (modify-phases %standard-phases
900 (add-before 'configure 'chdir-src
901 (lambda _ (chdir "src") #t))
904 (let ((bindir (string-append %output "/bin"))
905 (docdir (string-append %output "/share/doc/john"))
906 (execdir (string-append %output "/libexec/john"))
907 (datadir (string-append %output "/share/john"))
908 (install-file-to (lambda (dir)
909 (lambda (f) (install-file f dir))))
910 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
911 (with-directory-excursion "../run"
912 (for-each (install-file-to bindir)
914 "john" "makechr" "cprepair" "SIPdump" "tgtsnarf"
915 "genmkvpwd" "mkvcalcproba" "calc_stat" "raw2dyna"
916 (find-files "." "(to|2)?john(-[^.]*)?$")))
917 (for-each (lambda (f) ; Install symlinked aliases
918 (let ((tgt (string-append bindir "/" (basename f))))
919 ;; The use of install-file above dereferences
920 ;; symlinks. We'd rather have the symlinks
921 ;; for clarity, so remove tgt before linking.
922 (when (file-exists? tgt) (delete-file tgt))
923 (symlink "john" tgt)))
924 (find-files "." symlink?))
925 (for-each (install-file-to execdir)
926 (cons* "mailer" "benchmark-unify" "relbench"
927 (find-files "." ".*\\.js")))
928 (for-each (lambda (f)
929 (let* ((base (basename f))
930 (name (substring base 0 (string-index base #\.)))
931 (link (string-append bindir "/" name)))
932 (install-file f execdir)
933 (when (and (executable-file? f)
934 (not (file-exists? link)))
935 (symlink (string-append execdir "/" base) link))))
936 (find-files "." ".*\\.(pl|py|rb|lua)"))
937 (for-each (install-file-to datadir)
938 (append (find-files "." "(stats|dictionary.*)")
939 (find-files "." "(.*\\.chr|.*\\.lst)")
940 (find-files "." ".*\\.conf")))
941 (copy-recursively "rules" (string-append datadir "/rules")))
942 (copy-recursively "../doc" docdir)
944 (delete 'check) ; Tests need installed .conf files; move after install
945 (add-after 'install 'check
947 (setenv "HOME" "/tmp") ; Some tests need to write to ~/.john
948 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
949 (apply (assoc-ref %standard-phases 'check) args))))))
950 (home-page "http://www.openwall.com/john/")
951 (synopsis "Password cracker")
952 (description "John the Ripper is a fast password cracker. Its primary
953 purpose is to detect weak Unix passwords. Besides several @code{crypt}
954 password hash types most commonly found on various Unix systems, supported out
955 of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
956 is the community-enhanced, \"jumbo\" version of John the Ripper.")
957 (license license:gpl2+))))
966 (uri (pypi-uri "sala" version))
969 "13qgmc3i2a0cqp8jqrfl93lnphfagb32pgfikc1gza2a14asxzi8"))))
970 (build-system python-build-system)
972 ;; Sala is supposed to work with Python 3.2 or higher,
973 ;; but it doesn't work with Python 3.6. Better stick
974 ;; to Python 2, which works fine.
975 `(#:python ,python-2))
979 (home-page "http://www.digip.org/sala/")
980 (synopsis "Encrypted plaintext password store")
982 "Store passwords and other bits of sensitive plain-text information
983 to encrypted files on a directory hierarchy. The information is protected
984 by GnuPG's symmetrical encryption.")
985 (license license:expat)))
993 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
997 "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
998 (build-system gnu-build-system)
999 (inputs `(("gtk2" ,gtk+-2)
1001 ("libxml2" ,libxml2)))
1002 (native-inputs `(("pkg-config" ,pkg-config)
1003 ("intltool" ,intltool)))
1006 (modify-phases %standard-phases
1007 (add-before 'configure 'pre-configure
1008 ;; The file po/POTFILES.in ends up missing for some reason in
1009 ;; both nix and guix builds. Adding the file with contents
1010 ;; found during troubleshooting.
1012 (call-with-output-file "po/POTFILES.in"
1014 (format port "data/fpm2.desktop.in
1015 data/fpm2.desktop.in.in
1025 (synopsis "Manage, generate and store passwords encrypted")
1026 (description "FPM2 is GTK2 port from Figaro's Password Manager
1027 originally developed by John Conneely, with some new enhancements.
1029 Upstream development seems to have stopped. It is therefore recommended
1030 to use a different password manager.")
1031 (home-page "https://als.regnet.cz/fpm2/")
1032 (license license:gpl2+)))
1034 (define-public pass-rotate
1036 (name "pass-rotate")
1042 (url "https://github.com/ddevault/pass-rotate")
1044 (file-name (git-file-name name version))
1047 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
1048 (build-system python-build-system)
1050 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1051 ("python-docopt" ,python-docopt)
1052 ("python-html5lib" ,python-html5lib)
1053 ("python-requests" ,python-requests)))
1054 (home-page "https://github.com/ddevault/pass-rotate")
1055 (synopsis "Rotate password on online services")
1056 (description "pass-rotate is a command line utility and python library for
1057 rotating passwords on various web services. It makes it easier to rotate your
1058 passwords, one at a time or in bulk, when security events or routine upkeep of
1059 your online accounts makes it necessary.")
1060 (license license:expat)))
1062 (define-public hashcat
1069 (uri (string-append "https://hashcat.net/files/hashcat-"
1073 "0f73y4cg8c7a6q7x34qvpfi4g3lw6j9bnn0a13g43aqyiskflfr8"))))
1075 `(("opencl-headers" ,opencl-headers)))
1076 (build-system gnu-build-system)
1078 '(#:tests? #f ;no tests
1079 #:make-flags (list (string-append "PREFIX=" %output))
1081 (modify-phases %standard-phases
1082 (delete 'configure))))
1083 (home-page "https://hashcat.net/hashcat/")
1084 (synopsis "Advanced password recovery utility")
1085 (description "Hashcat is an password recovery utility, supporting five
1086 unique modes of attack for over 200 highly-optimized hashing algorithms.
1087 Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
1088 Linux, Windows, and macOS, and has facilities to help enable distributed
1089 password cracking.")
1090 (license license:expat)))
1092 (define-public hashcat-utils
1094 (name "hashcat-utils")
1099 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
1100 "download/v" version "/"
1101 "hashcat-utils-" version ".7z"))
1103 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
1105 `(("p7zip" ,p7zip)))
1108 (build-system gnu-build-system)
1110 `(#:tests? #f ;no tests
1111 #:make-flags (list "CC=gcc"
1112 ;; Upstream bug(?): "make all" seems to remove the
1113 ;; Perl scripts from the source.
1116 (modify-phases %standard-phases
1118 (lambda* (#:key source #:allow-other-keys)
1119 (invoke "7z" "x" source)
1120 (chdir (string-append "hashcat-utils-" ,version "/src"))
1124 (lambda* (#:key outputs #:allow-other-keys)
1125 (let ((out (string-append (assoc-ref outputs "out") "/bin")))
1129 (copy-file file (string-append out "/"
1130 (basename file ".bin"))))
1131 (find-files "." "\\.bin$"))
1134 (copy-file file (string-append out "/"
1135 (basename file ".pl"))))
1136 (find-files "../bin" "\\.pl$"))
1138 (home-page "https://github.com/hashcat/hashcat-utils/")
1139 (synopsis "Small utilities that are useful in advanced password cracking")
1140 (description "Hashcat-utils are a set of small utilities that are useful
1141 in advanced password cracking. They all are packed into multiple stand-alone
1142 binaries. All of these utils are designed to execute only one specific
1143 function. Since they all work with @code{STDIN} and @code{STDOUT} you can
1144 group them into chains.")
1145 (license license:expat)))
1147 (define-public bruteforce-luks
1149 (name "bruteforce-luks")
1154 (uri (string-append "https://github.com/glv2/bruteforce-luks/releases/download/"
1160 (base32 "0yawrlbbklhmvwr99wm7li3r0d5kxvpkwf33a12rji7z0ya5p340"))))
1161 (build-system gnu-build-system)
1165 `(("cryptsetup" ,cryptsetup)))
1166 (synopsis "LUKS encrypted volume cracker")
1168 "This is a cracker for LUKS encrypted volumes. It can be used either in
1169 exhaustive mode to try every password given a charset or in dictionary mode to
1170 try every password contained in a file.")
1171 (home-page "https://github.com/glv2/bruteforce-luks")
1172 (license license:gpl3+)))
1174 (define-public makepasswd
1175 (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
1179 (version (git-version "0.5.4" revision commit))
1184 (url "https://github.com/khorben/makepasswd")
1186 (file-name (git-file-name name version))
1188 (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
1189 (build-system gnu-build-system)
1191 `(("pkg-config" ,pkg-config)
1192 ("libxslt" ,libxslt)
1193 ("libxml2" ,libxml2)
1194 ("docbook-xsl" ,docbook-xsl)
1195 ("docbook-xml" ,docbook-xml)))
1197 `(("openssl" ,openssl)))
1200 (modify-phases %standard-phases
1201 (delete 'configure))
1202 #:make-flags (list "CC=gcc"
1203 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1204 #:tests? #f)) ;no tests
1205 (synopsis "Generate (pseudo-)random passwords and hashes")
1207 "Makepasswd is a program that generates pseudo-random passwords of a
1208 desired length. It can also generate their corresponding hashes for a given
1209 encryption algorithm if so desired.")
1210 (home-page "https://github.com/khorben/makepasswd")
1211 (license license:gpl3))))