gnu: pass-age: Unpropagate inputs.
[jackhill/guix/guix.git] / gnu / packages / password-utils.scm
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>
37 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
38 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
39 ;;; Copyright © 2022 ( <paren@disroot.org>
40 ;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
41 ;;;
42 ;;; This file is part of GNU Guix.
43 ;;;
44 ;;; GNU Guix is free software; you can redistribute it and/or modify it
45 ;;; under the terms of the GNU General Public License as published by
46 ;;; the Free Software Foundation; either version 3 of the License, or (at
47 ;;; your option) any later version.
48 ;;;
49 ;;; GNU Guix is distributed in the hope that it will be useful, but
50 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
51 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52 ;;; GNU General Public License for more details.
53 ;;;
54 ;;; You should have received a copy of the GNU General Public License
55 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
56
57 (define-module (gnu packages password-utils)
58 #:use-module ((guix licenses) #:prefix license:)
59 #:use-module (guix utils)
60 #:use-module (guix build-system cmake)
61 #:use-module (guix build-system copy)
62 #:use-module (guix build-system gnu)
63 #:use-module (guix build-system go)
64 #:use-module (guix build-system python)
65 #:use-module (guix build-system trivial)
66 #:use-module (guix download)
67 #:use-module (guix gexp)
68 #:use-module (guix git-download)
69 #:use-module (guix packages)
70 #:use-module (gnu packages)
71 #:use-module (gnu packages admin)
72 #:use-module (gnu packages aidc)
73 #:use-module (gnu packages authentication)
74 #:use-module (gnu packages autotools)
75 #:use-module (gnu packages base)
76 #:use-module (gnu packages check)
77 #:use-module (gnu packages compression)
78 #:use-module (gnu packages crypto)
79 #:use-module (gnu packages cryptsetup)
80 #:use-module (gnu packages curl)
81 #:use-module (gnu packages digest)
82 #:use-module (gnu packages docbook)
83 #:use-module (gnu packages file)
84 #:use-module (gnu packages freedesktop)
85 #:use-module (gnu packages gettext)
86 #:use-module (gnu packages glib)
87 #:use-module (gnu packages gnome)
88 #:use-module (gnu packages gnupg)
89 #:use-module (gnu packages golang)
90 #:use-module (gnu packages gtk)
91 #:use-module (gnu packages guile)
92 #:use-module (gnu packages kerberos)
93 #:use-module (gnu packages libffi)
94 #:use-module (gnu packages libusb)
95 #:use-module (gnu packages linux)
96 #:use-module (gnu packages man)
97 #:use-module (gnu packages multiprecision)
98 #:use-module (gnu packages ncurses)
99 #:use-module (gnu packages nss)
100 #:use-module (gnu packages opencl)
101 #:use-module (gnu packages perl)
102 #:use-module (gnu packages pkg-config)
103 #:use-module (gnu packages python)
104 #:use-module (gnu packages python-web)
105 #:use-module (gnu packages python-xyz)
106 #:use-module (gnu packages readline)
107 #:use-module (gnu packages ruby)
108 #:use-module (gnu packages security-token)
109 #:use-module (gnu packages suckless)
110 #:use-module (gnu packages tcl)
111 #:use-module (gnu packages tls)
112 #:use-module (gnu packages qt)
113 #:use-module (gnu packages version-control)
114 #:use-module (gnu packages wxwidgets)
115 #:use-module (gnu packages xdisorg)
116 #:use-module (gnu packages xorg)
117 #:use-module (gnu packages xml))
118
119 (define-public age
120 (package
121 (name "age")
122 (version "1.0.0")
123 (source
124 (origin
125 (method git-fetch)
126 (uri (git-reference
127 (url "https://github.com/FiloSottile/age")
128 (commit (string-append "v" version))))
129 (file-name (git-file-name name version))
130 (sha256
131 (base32 "19fz68n262kvg2ssw4r6nik30zk6g6cy7rdi0fm05czwigqrdz1i"))))
132 (build-system go-build-system)
133 (arguments `(#:import-path "filippo.io/age"))
134 (inputs
135 (list go-golang-org-x-sys
136 go-golang-org-x-term
137 go-golang-org-x-crypto
138 go-filippo-io-edwards25519))
139 (home-page "https://filippo.io/age")
140 (synopsis "Secure file encryption tool, format, and Go library")
141 (description
142 "This package implements file encryption according to the
143 @{age-encryption.org/v1, https://age-encryption.org/v1} specification.
144 It features small explicit keys, no configuration options, and Unix-style
145 composability.")
146 (license license:bsd-3)))
147
148 (define-public pwgen
149 (package
150 (name "pwgen")
151 (version "2.08")
152 (source
153 (origin
154 (method url-fetch)
155 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
156 "/pwgen-" version ".tar.gz"))
157 (sha256
158 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
159 (build-system gnu-build-system)
160 (arguments
161 `(#:tests? #f)) ; no test suite
162 (home-page "http://pwgen.sourceforge.net/")
163 (synopsis "Password generator")
164 (description "Pwgen generates passwords which can be easily memorized by a
165 human.")
166 (license license:gpl2)))
167
168 (define-public keepassxc
169 (package
170 (name "keepassxc")
171 (version "2.7.1")
172 (source
173 (origin
174 (method url-fetch)
175 (uri (string-append "https://github.com/keepassxreboot/keepassxc"
176 "/releases/download/" version "/keepassxc-"
177 version "-src.tar.xz"))
178 (sha256
179 (base32 "1ryk2ndv93jb155cp7qkjm7jd8hjy0v5gqvdvbdidhrmdiibl0b0"))))
180 (build-system cmake-build-system)
181 (arguments
182 (list
183 #:modules '((guix build cmake-build-system)
184 (guix build qt-utils)
185 (guix build utils))
186 #:imported-modules `(,@%cmake-build-system-modules
187 (guix build qt-utils))
188 #:configure-flags
189 #~(list "-DWITH_XC_ALL=YES"
190 "-DWITH_XC_UPDATECHECK=NO")
191 #:phases
192 #~(modify-phases %standard-phases
193 (replace 'check
194 (lambda* (#:key tests? #:allow-other-keys)
195 (when tests?
196 ;; Fails with "TestCli::testClip() Compared values are not the
197 ;; same". That test also requires a phase with (setenv
198 ;; "QT_QPA_PLATFORM" "offscreen") in order to work.
199 (invoke "ctest" "--exclude-regex" "testcli"))))
200 (add-after 'install 'wrap-qt
201 (lambda* (#:key inputs #:allow-other-keys)
202 (wrap-qt-program "keepassxc" #:output #$output #:inputs inputs))))))
203 (native-inputs
204 (list qttools-5 ruby-asciidoctor))
205 (inputs
206 (list argon2
207 botan
208 libgcrypt
209 libsodium ; XC_BROWSER
210 libusb
211 libyubikey ; XC_YUBIKEY
212 libxi
213 libxtst
214 minizip
215 pcsc-lite
216 qrencode
217 qtbase-5
218 qtsvg-5
219 qtx11extras
220 quazip-0 ; XC_KEESHARE
221 readline
222 yubikey-personalization ; XC_YUBIKEY
223 zlib))
224 (home-page "https://www.keepassxc.org")
225 (synopsis "Password manager")
226 (description "KeePassXC is a password manager or safe which helps you to
227 manage your passwords in a secure way. You can put all your passwords in one
228 database, which is locked with one master key or a key-file which can be stored
229 on an external storage device. The databases are encrypted using the
230 algorithms AES or Twofish.")
231 (properties
232 '((release-monitoring-url . "https://github.com/keepassxreboot/keepassxc/releases")))
233 ;; While various parts of the software are licensed under different licenses,
234 ;; the combined work falls under the GPLv3.
235 (license license:gpl3)))
236
237 (define-public pwsafe
238 (package
239 (name "pwsafe")
240 (version "3.54.1")
241 (home-page "https://www.pwsafe.org/")
242 (source
243 (origin
244 (method git-fetch)
245 (uri (git-reference
246 (url "https://github.com/pwsafe/pwsafe")
247 (commit version)))
248 (sha256
249 (base32 "0d51dlw98mv23nwb0b5jyji8gnb9f5cnig6kivfljl97lmr6lhvf"))
250 (file-name (git-file-name name version))))
251 (build-system cmake-build-system)
252 (native-inputs
253 `(("gettext" ,gettext-minimal)
254 ("gtest" ,googletest)
255 ("perl" ,perl)
256 ("zip" ,zip)))
257 (inputs `(("curl" ,curl)
258 ("file" ,file)
259 ("libuuid" ,util-linux "lib")
260 ("libxt" ,libxt)
261 ("libxtst" ,libxtst)
262 ("openssl" ,openssl)
263 ("qrencode" ,qrencode)
264 ("wxwidgets" ,wxwidgets)
265 ("xerces-c" ,xerces-c)))
266 (arguments '(#:configure-flags (list "-DNO_GTEST=YES")
267 #:phases (modify-phases %standard-phases
268 (add-after 'unpack 'add-gtest
269 (lambda* (#:key inputs #:allow-other-keys)
270 (chmod "CMakeLists.txt" #o644)
271 (let ((cmake-port (open-file "CMakeLists.txt"
272 "a")))
273 (display "find_package(GTest)
274 add_subdirectory(src/test)\n" cmake-port)
275 (close cmake-port)
276 #t))))))
277 (synopsis "Password safe with automatic input and key generation")
278 (description "pwsafe is a password manager originally designed by Bruce
279 Schneier. It offers a simple UI to manage passwords for different services.
280 There are other programs that support the file format on different
281 platforms.")
282 (license license:artistic2.0)))
283
284 (define-public pwsafe-cli
285 (let ((commit "c49a0541b66647ad04d19ddb351d264054c67759")
286 (revision "0"))
287 (package
288 (name "pwsafe-cli")
289 (version (git-version "0.2.0" revision commit))
290 (source
291 (origin
292 (method git-fetch)
293 (uri (git-reference
294 (url "https://github.com/nsd20463/pwsafe")
295 (commit commit)))
296 (sha256
297 (base32
298 "0ak09r1l7k57m6pdx468hhzvz0szmaq42vyr575fvsjc8rbrp8qq"))
299 (file-name (git-file-name name version))))
300 (build-system gnu-build-system)
301 (arguments
302 ;; FIXME: skip failing test suite (requires write access to /tmp),
303 ;; patching path does not help somehow.
304 `(#:tests? #f
305 #:phases
306 (modify-phases %standard-phases
307 (replace 'bootstrap
308 (lambda _
309 (invoke "aclocal")
310 (invoke "autoheader")
311 (invoke "automake" "--add-missing")
312 (invoke "autoconf")
313 #t)))))
314 (native-inputs
315 (list autoconf automake))
316 (inputs
317 (list libx11 libxmu libxt openssl))
318 (home-page "https://github.com/nsd20463/pwsafe")
319 (synopsis "CLI password manager")
320 (description
321 "@command{pwsafe} is a command line tool compatible with
322 Counterpane's Passwordsafe.")
323 (license license:gpl2+))))
324
325 (define-public shroud
326 (package
327 (name "shroud")
328 (version "0.1.2")
329 (source (origin
330 (method url-fetch)
331 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
332 version ".tar.gz"))
333 (sha256
334 (base32
335 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
336 (build-system gnu-build-system)
337 (native-inputs
338 (list pkg-config))
339 (arguments
340 `(#:modules ((guix build gnu-build-system)
341 (guix build utils)
342 (ice-9 popen)
343 (ice-9 rdelim))
344 #:phases
345 (modify-phases %standard-phases
346 (add-after 'install 'wrap-shroud
347 (lambda* (#:key inputs outputs #:allow-other-keys)
348 (let* ((out (assoc-ref outputs "out"))
349 (guile (assoc-ref inputs "guile"))
350 (effective (read-line
351 (open-pipe* OPEN_READ
352 (string-append guile "/bin/guile")
353 "-c" "(display (effective-version))")))
354 (ccachedir (string-append out
355 "/lib/guile/" effective "/site-ccache"))
356 (prog (string-append out "/bin/shroud")))
357 (wrap-program prog
358 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
359 #t))))))
360 (inputs
361 (list guile-2.2 gnupg xclip))
362 (synopsis "GnuPG-based secret manager")
363 (description "Shroud is a simple secret manager with a command line
364 interface. The password database is stored as a Scheme s-expression and
365 encrypted with a GnuPG key. Secrets consist of an arbitrary number of
366 key/value pairs, making Shroud suitable for more than just password storage.
367 For copying and pasting secrets into web browsers and other graphical
368 applications, there is xclip integration." )
369 (home-page "https://dthompson.us/projects/shroud.html")
370 (license license:gpl3+)))
371
372 (define-public yapet
373 (package
374 (name "yapet")
375 (version "2.5")
376 (source
377 (origin
378 (method url-fetch)
379 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
380 version ".tar.xz"))
381 (sha256
382 (base32 "0hpibsdry259cmvps35isr6jn9cd9fsk3r1h0ppjx9zxfrpqwldg"))))
383 (build-system gnu-build-system)
384 (arguments
385 `(#:configure-flags
386 (list (string-append "--docdir=" (assoc-ref %outputs "out")
387 "/share/doc",name "-" ,version))))
388 (inputs
389 (list argon2 ncurses openssl))
390 (native-inputs
391 (list cppunit pkg-config))
392 (synopsis "Yet Another Password Encryption Tool")
393 (description "YAPET is a text based password manager using the Blowfish
394 encryption algorithm. Because of its small footprint and very few library
395 dependencies, it is suited for installing on desktop and server systems alike.
396 The text based user interface allows you to run YAPET easily in a Secure Shell
397 session. Two companion utilities enable users to convert CSV files to YAPET
398 and vice versa.")
399 (home-page "https://yapet.guengel.ch/")
400 (license license:gpl3+)))
401
402 (define-public cracklib
403 (package
404 (name "cracklib")
405 (version "2.9.8")
406 (source
407 (origin
408 (method url-fetch)
409 (uri (string-append "https://github.com/cracklib/cracklib/"
410 "releases/download/v" version "/"
411 "cracklib-" version ".tar.bz2"))
412 (sha256
413 (base32 "11p3f0yqg9d32g3n1qik7jfyl2l14pf8i8vzq3bpram3bqw3978z"))))
414 (build-system gnu-build-system)
415 (arguments
416 `(#:phases
417 (modify-phases %standard-phases
418 (add-after 'install 'install-dict
419 (lambda* (#:key make-flags #:allow-other-keys)
420 (begin
421 (chmod (string-append "util/cracklib-format") #o755)
422 (apply invoke "make" "dict" make-flags)
423 #t))))))
424 (synopsis "Password checking library")
425 (home-page "https://github.com/cracklib/cracklib")
426 (description
427 "CrackLib is a library containing a C function which may be used in a
428 @command{passwd}-like program. The idea is simple: try to prevent users from
429 choosing passwords that could easily be guessed (or \"cracked\") by filtering
430 them out, at the source.")
431 (license license:lgpl2.1)))
432
433 (define-public libpwquality
434 (package
435 (name "libpwquality")
436 (version "1.4.4")
437 (source (origin
438 (method url-fetch)
439 (uri (list
440 (string-append "https://github.com/libpwquality/libpwquality"
441 "/releases/download/libpwquality-" version
442 "/libpwquality-" version ".tar.bz2")
443 (string-append "https://launchpad.net/libpwquality/trunk/"
444 version "/+download/"
445 "libpwquality-" version ".tar.bz2")))
446 (sha256
447 (base32
448 "0id5a8bi8xnjg11g9vzrl2xbpx65mfxclxcvis7zx1v8vhisyfyl"))))
449 (build-system gnu-build-system)
450 (arguments
451 `(#:phases
452 (modify-phases %standard-phases
453 (add-before 'configure 'set-LDFLAGS
454 (lambda* (#:key inputs outputs #:allow-other-keys)
455 (setenv "LDFLAGS"
456 (string-append
457 "-Wl,-rpath="
458 (assoc-ref outputs "out") "/lib"))
459 #t)))))
460 (native-inputs
461 `(("python" ,python-wrapper)))
462 (inputs
463 (list cracklib))
464 (synopsis "Password quality checker")
465 (home-page "https://github.com/libpwquality/libpwquality")
466 (description
467 "Libpwquality is a library for password quality checking and generation of
468 random passwords that pass the checks.")
469 (license license:gpl2+)))
470
471 (define-public assword
472 (package
473 (name "assword")
474 (version "0.11")
475 (source (origin
476 (method url-fetch)
477 (uri (list
478 (string-append
479 "http://http.debian.net/debian/pool/main/a/assword/"
480 "assword_" version ".orig.tar.gz")))
481 (sha256
482 (base32
483 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
484 (arguments
485 `(;; irritatingly, tests do run but not there are two problems:
486 ;; - "import gtk" fails for unknown reasons here despite it the
487 ;; program working (indeed, I've found I have to do a logout and log
488 ;; back in in after an install order for some mumbo jumbo environment
489 ;; variable mess to work with pygtk and assword... what's up with
490 ;; that?)
491 ;; - even when the tests fail, they don't return a nonzero status,
492 ;; so I'm not sure how to programmatically get that information
493 #:tests? #f
494 #:phases
495 (modify-phases %standard-phases
496 (add-after 'install 'wrap-assword
497 (lambda* (#:key outputs #:allow-other-keys)
498 (let ((prog (string-append
499 (assoc-ref outputs "out")
500 "/bin/assword"))
501 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
502 (wrap-program prog
503 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
504 #t)))
505 (add-after 'install 'manpage
506 (lambda* (#:key outputs #:allow-other-keys)
507 (invoke "make" "assword.1")
508 (install-file
509 "assword.1"
510 (string-append (assoc-ref outputs "out") "/share/man/man1")))))))
511 (build-system python-build-system)
512 (native-inputs
513 (list txt2man))
514 (inputs
515 (list gtk+ python-xdo python-gpg python-pygobject))
516 (propagated-inputs
517 (list xclip))
518 (home-page "https://finestructure.net/assword/")
519 (synopsis "Password manager")
520 (description "assword is a simple password manager using GPG-wrapped
521 JSON files. It has a command line interface as well as a very simple
522 graphical interface, which can even \"type\" your passwords into
523 any X11 window.")
524 (license license:gpl3+)))
525
526 (define-public password-store
527 (package
528 (name "password-store")
529 (version "1.7.4")
530 (source (origin
531 (method git-fetch)
532 (uri (git-reference
533 (url "git://git.zx2c4.com/password-store")
534 (commit version)))
535 (sha256
536 (base32
537 "17zp9pnb3i9sd2zn9qanngmsywrb7y495ngcqs6313pv3gb83v53"))
538 (patches (search-patches "password-store-tree-compat.patch"))
539 (file-name (git-file-name name version))))
540 (build-system gnu-build-system)
541 (arguments
542 '(#:phases
543 (modify-phases %standard-phases
544 (delete 'configure)
545 (delete 'build)
546 (add-before 'install 'patch-system-extension-dir
547 (lambda* (#:key outputs #:allow-other-keys)
548 (let* ((out (assoc-ref outputs "out"))
549 (extension-dir (string-append out "/lib/password-store/extensions")))
550 (substitute* "src/password-store.sh"
551 (("^SYSTEM_EXTENSION_DIR=.*$")
552 ;; lead with whitespace to prevent 'make install' from
553 ;; overwriting it again
554 (string-append " SYSTEM_EXTENSION_DIR=\""
555 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
556 extension-dir
557 "}\"\n"))))))
558 (add-before 'install 'patch-passmenu-path
559 ;; FIXME Wayland support requires ydotool and dmenu-wl packages
560 ;; We are ignoring part of the script that gets executed if
561 ;; WAYLAND_DISPLAY env variable is set, leaving dmenu-wl and ydotool
562 ;; commands as is.
563 (lambda* (#:key inputs #:allow-other-keys)
564 (substitute* "contrib/dmenu/passmenu"
565 (("dmenu=dmenu\n")
566 (string-append "dmenu="
567 (search-input-file inputs "/bin/dmenu")
568 "\n"))
569 (("xdotool=\"xdotool")
570 (string-append "xdotool=\""
571 (search-input-file inputs "/bin/xdotool"))))))
572 (add-after 'install 'install-passmenu
573 (lambda* (#:key outputs #:allow-other-keys)
574 (let* ((out (assoc-ref outputs "out"))
575 (bin (string-append out "/bin")))
576 (install-file "contrib/dmenu/passmenu" bin))))
577 (add-after 'install 'wrap-path
578 (lambda* (#:key inputs outputs #:allow-other-keys)
579 (let* ((out (assoc-ref outputs "out"))
580 (requisites '("getopt" "git" "gpg" "qrencode" "sed"
581 "tree" "which" "wl-copy" "xclip"))
582 (path (map (lambda (pkg)
583 (dirname (search-input-file
584 inputs (string-append "/bin/" pkg))))
585 requisites)))
586 (wrap-program (string-append out "/bin/pass")
587 `("PATH" ":" prefix (,(string-join path ":"))))))))
588 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
589 "WITH_ALLCOMP=yes"
590 (string-append "BASHCOMPDIR="
591 %output "/etc/bash_completion.d"))
592 ;; Parallel tests may cause a race condition leading to a
593 ;; timeout in some circumstances.
594 #:parallel-tests? #f
595 #:test-target "test"))
596 (native-search-paths
597 (list (search-path-specification
598 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
599 (separator #f) ;single entry
600 (files '("lib/password-store/extensions")))))
601 (inputs
602 (list dmenu
603 util-linux
604 git
605 gnupg
606 qrencode
607 sed
608 tree
609 which
610 wl-clipboard
611 xclip
612 xdotool))
613 (home-page "https://www.passwordstore.org/")
614 (synopsis "Encrypted password manager")
615 (description "Password-store is a password manager which uses GnuPG to
616 store and retrieve passwords. The tool stores each password in its own
617 GnuPG-encrypted file, allowing the program to be simple yet secure.
618 Synchronization is possible using the integrated git support, which commits
619 changes to your password database to a git repository that can be managed
620 through the pass command.")
621 (license license:gpl2+)))
622
623 (define-public pass-age
624 (package
625 (inherit password-store)
626 (name "pass-age")
627 (version "1.7.4a0")
628 (source
629 (origin
630 (method git-fetch)
631 (uri (git-reference
632 (url "https://github.com/FiloSottile/passage")
633 (commit version)))
634 (file-name (git-file-name name version))
635 (sha256
636 (base32 "17899whffnpqqx9x1nx2b8bfxbxlh1pwlglqa0kznl0cn6sb37ql"))))
637 (build-system copy-build-system)
638 (arguments
639 '(#:modules
640 ((guix build copy-build-system)
641 (guix build utils)
642 (srfi srfi-26))
643 #:phases
644 (modify-phases %standard-phases
645 (add-after 'unpack 'rename-script
646 (lambda _
647 (rename-file "src/password-store.sh"
648 "src/passage")))
649 (add-after 'install 'wrap-script
650 (lambda* (#:key inputs outputs #:allow-other-keys)
651 (let* ((out (assoc-ref outputs "out"))
652 (script (string-append out "/bin/passage")))
653 (substitute* script
654 ;; Avoid ugly ‘.passage-real’ in --help output and elsewhere.
655 (("^(PROGRAM=).*" _ program=)
656 (string-append program= (basename script) "\n")))
657 (wrap-program script
658 `("PATH" ":" prefix
659 ,(map dirname
660 (map (cut search-input-file inputs <>)
661 (list "bin/age"
662 "bin/getopt"
663 "bin/git"
664 "bin/pkill"
665 "bin/qrencode"
666 "bin/sed"
667 "bin/tree")))))))))
668 #:install-plan
669 '(("src/passage" "/bin/")
670 ("src/completion/pass.bash-completion"
671 "/share/bash-completion/completions/")
672 ("src/completion/pass.zsh-completion"
673 "/share/zsh/site-functions/"))))
674 (inputs
675 (list age git procps qrencode sed tree util-linux))
676 (home-page "https://github.com/FiloSottile/passage")
677 (synopsis "Encrypted password manager")
678 (description "This package provides an encrypted password manager, forked
679 from the @code{password-store} package. Files are encrypted with the
680 @command{age} encryption package with small explicit keys.")
681 (license license:gpl2+)))
682
683 (define-public pass-otp
684 (package
685 (name "pass-otp")
686 (version "1.2.0")
687 (source
688 (origin
689 (method url-fetch)
690 (uri
691 (string-append "https://github.com/tadfisher/pass-otp/releases/"
692 "download/v" version "/pass-otp-" version ".tar.gz"))
693 (sha256
694 (base32
695 "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
696 (build-system gnu-build-system)
697 (arguments
698 '(#:make-flags
699 (let* ((out (assoc-ref %outputs "out"))
700 (bashcomp (string-append out "/etc/bash_completion.d")))
701 (list (string-append "PREFIX=" %output)
702 (string-append "BASHCOMPDIR=" bashcomp)))
703 #:phases
704 (modify-phases %standard-phases
705 (delete 'configure)
706 (add-after 'build 'patch-oath-path
707 (lambda* (#:key inputs #:allow-other-keys)
708 (substitute* "otp.bash"
709 (("^OATH=.*$")
710 (string-append
711 "OATH="
712 (assoc-ref inputs "oath-toolkit")
713 "/bin/oathtool\n")))
714 #t)))
715 #:test-target "test"))
716 (inputs
717 (list oath-toolkit))
718 (native-inputs
719 (list password-store expect git gnupg which))
720 (home-page "https://github.com/tadfisher/pass-otp")
721 (synopsis "Pass extension for managing one-time-password (OTP) tokens")
722 (description
723 "Pass OTP is an extension for password-store that allows adding
724 one-time-password (OTP) secrets, generating OTP codes, and displaying secret
725 key URIs using the standard otpauth:// scheme.")
726 (license license:gpl3+)))
727
728 (define-public qtpass
729 (package
730 (name "qtpass")
731 (version "1.3.2")
732 (source
733 (origin
734 (method git-fetch)
735 (uri (git-reference
736 (url "https://github.com/IJHack/QtPass")
737 (commit (string-append "v" version))))
738 (file-name (git-file-name name version))
739 (sha256
740 (base32
741 "0748hjvhjrybi33ci3c8hcr74k9pdrf5jv8npf9hrsrmdyy1kr9x"))))
742 (build-system gnu-build-system)
743 (arguments
744 `(#:modules ((guix build gnu-build-system)
745 (guix build qt-utils)
746 (guix build utils))
747 #:imported-modules (,@%gnu-build-system-modules
748 (guix build qt-utils))
749 #:phases
750 (modify-phases %standard-phases
751 (replace 'configure
752 (lambda* (#:key inputs outputs #:allow-other-keys)
753 (let ((out (assoc-ref outputs "out")))
754 ;; lupdate/lrelease need to find qmake.
755 (setenv "QMAKE" "qmake")
756 ;; qmake needs to find lrelease/lupdate.
757 (invoke "qmake"
758 "QMAKE_LRELEASE=lrelease"
759 "QMAKE_LUPDATE=lupdate"
760 (string-append "PREFIX=" out)))))
761 (add-after 'configure 'reset-resource-timestamps
762 ;; Reset timestamps on localization files for a reproducible build.
763 (lambda _
764 (with-directory-excursion "localization"
765 (for-each (lambda (file)
766 (let* ((base (basename file ".qm"))
767 (src (string-append base ".ts"))
768 (st (stat src)))
769 (set-file-time file st)))
770 (find-files "." ".*\\.qm")))
771 #t))
772 (add-after 'install 'install-auxilliary
773 ;; Install man-page, icon and .desktop file.
774 (lambda* (#:key inputs outputs #:allow-other-keys)
775 (let* ((out (assoc-ref outputs "out"))
776 (applications (string-append out "/share/applications"))
777 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
778 (man (string-append out "/share/man/man1")))
779 (install-file "qtpass.desktop" applications)
780 (install-file "artwork/icon.svg" icons)
781 (rename-file (string-append icons "/icon.svg")
782 (string-append icons "/qtpass-icon.svg"))
783 (install-file "qtpass.1" man)
784 #t)))
785 (add-after 'install 'wrap-qt
786 (lambda* (#:key outputs inputs #:allow-other-keys)
787 (let ((out (assoc-ref outputs "out")))
788 (wrap-qt-program "qtpass" #:output out #:inputs inputs))
789 #t))
790 (add-before 'check 'check-setup
791 ;; Make Qt render "offscreen", required for tests.
792 (lambda _
793 (setenv "QT_QPA_PLATFORM" "offscreen")
794 #t)))))
795 (native-inputs
796 (list qttools-5))
797 (inputs
798 (list qtbase-5 qtsvg-5))
799 (home-page "https://qtpass.org")
800 (synopsis "GUI for password manager password-store")
801 (description
802 "Qt-based graphical user interface for the password manager
803 password-store also known as pass. Can use either pass or gpg to interact
804 with password-store files. Features configurable password generation,
805 templates, clipboard handling, and per folder settings for multi-recipient
806 encryption.")
807 (license license:gpl3+)))
808
809 (define-public rofi-pass
810 (package
811 (name "rofi-pass")
812 (version "2.0.2")
813 (source
814 (origin
815 (method url-fetch)
816 (uri
817 (string-append "https://raw.githubusercontent.com/carnager/rofi-pass/"
818 version "/rofi-pass"))
819 (sha256
820 (base32 "0msldkndqp40nx1s5s7ggcr97ir4nshpmnyzvj5hqw1l7m3gvw6j"))
821 (file-name name)))
822 (build-system trivial-build-system)
823 (arguments
824 `(#:modules ((guix build utils))
825 #:builder
826 (begin
827 (use-modules (guix build utils))
828 (let ((source (string-append (assoc-ref %build-inputs "source")))
829 (script "rofi-pass")
830 (out (assoc-ref %outputs "out")))
831 (copy-file source script)
832 (chmod script #o555)
833 (install-file script (string-append out "/bin"))))))
834 (propagated-inputs
835 (list password-store rofi xdotool))
836 (home-page "https://github.com/carnager/rofi-pass")
837 (synopsis "Rofi frontend for password-store")
838 (description "Rofi-pass provides a way to manipulate information stored
839 using password-store through rofi interface:
840 @enumerate
841 @item open URLs of entries with hotkey;
842 @item type any field from entry;
843 @item auto-typing of user and/or password fields;
844 @item auto-typing username based on path;
845 @item auto-typing of more than one field, using the autotype entry;
846 @item bookmarks mode (open stored URLs in browser, default: Alt+x).
847 @end enumerate")
848 (license license:gpl3)))
849
850 (define-public tessen
851 (package
852 (name "tessen")
853 (version "2.1.2")
854 (source (origin
855 (method git-fetch)
856 (uri (git-reference
857 (url "https://github.com/ayushnix/tessen/")
858 (commit (string-append "v" version))))
859 (file-name (git-file-name name version))
860 (sha256
861 (base32
862 "01jaxakq847k3v2wid8fzhcmq8mraxz0q1j87s1jv75l1gy4qiij"))))
863 (build-system gnu-build-system)
864 (arguments
865 (list #:tests?
866 #f ;no tests
867 #:phases
868 #~(modify-phases %standard-phases
869 (add-after 'unpack 'patch-wtype-path
870 (lambda* (#:key inputs #:allow-other-keys)
871 (substitute* "tessen"
872 (("notify-send") (search-input-file inputs
873 "/bin/notify-send"))
874 (("wl-copy") (search-input-file inputs "/bin/wl-copy"))
875 (("wtype") (search-input-file inputs "/bin/wtype"))
876 (("xdg-open") (search-input-file inputs "/bin/xdg-open")))))
877 (delete 'configure)) ;no configure script
878 #:make-flags
879 #~(list (string-append "PREFIX="
880 #$output))))
881 (native-inputs (list scdoc))
882 (inputs (list libnotify wl-clipboard wtype xdg-utils))
883 (home-page "https://github.com/ayushnix/tessen")
884 (synopsis "Frontend for password-store and gopass")
885 (description "Tessen is a bash script that can autotype and copy data
886 from password-store and gopass files.")
887 (license license:gpl2+)))
888
889 (define-public browserpass-native
890 (package
891 (name "browserpass-native")
892 (version "3.0.7")
893 (source
894 (origin
895 (method git-fetch)
896 (uri (git-reference
897 (url "https://github.com/browserpass/browserpass-native")
898 (commit version)))
899 (file-name (git-file-name name version))
900 (sha256
901 (base32
902 "1jkjslbbac49xjyjkc2b07phdm3i64z40kh6h55cl22dxjmpp1nb"))))
903 (build-system go-build-system)
904 (arguments
905 `(#:import-path "github.com/browserpass/browserpass-native"
906 #:install-source? #f
907 #:phases
908 (modify-phases %standard-phases
909 (add-before 'build 'patch-makefile
910 (lambda* (#:key outputs #:allow-other-keys)
911 (let ((out (assoc-ref outputs "out")))
912 ;; This doesn't go in #:make-flags because the Makefile itself
913 ;; gets installed.
914 (substitute*
915 "src/github.com/browserpass/browserpass-native/Makefile"
916 (("PREFIX \\?= /usr")
917 (string-append "PREFIX ?= " out)))
918 #t)))
919 (add-before 'build 'configure
920 (lambda _
921 (with-directory-excursion
922 "src/github.com/browserpass/browserpass-native"
923 (invoke "make" "configure"))
924 #t))
925 (replace 'build
926 (lambda _
927 (with-directory-excursion
928 "src/github.com/browserpass/browserpass-native"
929 (invoke "make"))
930 #t))
931 (replace 'install
932 (lambda _
933 (with-directory-excursion
934 "src/github.com/browserpass/browserpass-native"
935 (invoke "make" "install"))
936 #t))
937 (add-after 'install 'wrap-executable
938 (lambda* (#:key inputs outputs #:allow-other-keys)
939 (let ((out (assoc-ref outputs "out"))
940 (gnupg (assoc-ref inputs "gnupg")))
941 (wrap-program (string-append out "/bin/browserpass")
942 `("PATH" ":" prefix
943 (,(string-append gnupg "/bin"))))
944 #t))))))
945 (native-inputs
946 (list which))
947 (inputs
948 (list gnupg go-github-com-mattn-go-zglob
949 go-github-com-rifflock-lfshook go-github-com-sirupsen-logrus
950 go-golang-org-x-sys))
951 (home-page "https://github.com/browserpass/browserpass-native")
952 (synopsis "Browserpass native messaging host")
953 (description "Browserpass is a browser extension for pass, a
954 UNIX-based password store manager. It allows you to auto-fill or copy to
955 clipboard credentials for the current domain, protecting you from phishing
956 attacks.
957
958 This package only contains the Browserpass native messaging host. You must
959 also install the browser extension for GNU IceCat or ungoogled-chromium
960 separately.")
961 (license license:isc)))
962
963 (define-public cpass
964 (package
965 (name "cpass")
966 (version "0.9.4")
967 (source (origin
968 (method url-fetch)
969 (uri (pypi-uri "cpass" version))
970 (sha256
971 (base32
972 "1zp3a8mgqxn916fzj1v2yhgnl7v6s0vnd0qcghqs3qq648qmlwr5"))))
973 (build-system python-build-system)
974 (arguments
975 (list #:phases
976 #~(modify-phases %standard-phases
977 (add-after 'unpack 'patch-pass-refs
978 (lambda* (#:key inputs #:allow-other-keys)
979 (substitute* "cpass.py"
980 (("'pass'")
981 (string-append "'"
982 (search-input-file inputs
983 "bin/pass")
984 "'"))
985 (("\\.password_store")
986 ".password-store")))))))
987 (inputs (list password-store))
988 (propagated-inputs (list python-urwid))
989 (home-page "https://github.com/OliverLew/cpass")
990 (synopsis "Textual interface for @command{pass}")
991 (description
992 "@command{cpass} is a terminal user interface for @command{pass}.
993 It supports both vim-like keybindings and the mouse.")
994 (license license:expat)))
995
996 (define-public argon2
997 (package
998 (name "argon2")
999 (version "20190702")
1000 (source
1001 (origin
1002 (method git-fetch)
1003 (uri (git-reference
1004 (url "https://github.com/P-H-C/phc-winner-argon2")
1005 (commit version)))
1006 (file-name (git-file-name name version))
1007 (sha256
1008 (base32
1009 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
1010 (build-system gnu-build-system)
1011 (arguments
1012 `(#:test-target "test"
1013 #:make-flags (list "CC=gcc"
1014 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1015 "LIBRARY_REL=lib"
1016 (string-append "ARGON2_VERSION=" ,version)
1017 "OPTTEST=1") ; disable CPU optimization
1018 #:phases
1019 (modify-phases %standard-phases
1020 (delete 'configure)))) ; No configure script.
1021 (home-page "https://www.argon2.com/")
1022 (synopsis "Password hashing library")
1023 (description "Argon2 provides a key derivation function that was declared
1024 winner of the 2015 Password Hashing Competition.")
1025 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
1026 ;; files are CC0 only; see README.md and LICENSE for details.
1027 (license (list license:cc0 license:asl2.0))))
1028
1029 (define-public pass-git-helper
1030 (package
1031 (name "pass-git-helper")
1032 (version "1.1.0")
1033 (source
1034 (origin
1035 (method git-fetch)
1036 (uri (git-reference
1037 (url "https://github.com/languitar/pass-git-helper")
1038 (commit (string-append "v" version))))
1039 (file-name (git-file-name name version))
1040 (sha256
1041 (base32
1042 "18nvwlp0w4aqj268wly60rnjzqw2d8jl0hbs6bkwp3hpzzz5g6yd"))))
1043 (build-system python-build-system)
1044 (arguments
1045 `(#:phases
1046 (modify-phases %standard-phases
1047 (add-before 'build 'patch-pass-path
1048 (lambda* (#:key inputs #:allow-other-keys)
1049 (let* ((password-store (assoc-ref inputs "password-store"))
1050 (pass (string-append password-store "/bin/pass")))
1051 (substitute* '("passgithelper.py"
1052 "test_passgithelper.py")
1053 (("'pass'") (string-append "'" pass "'")))
1054 #t)))
1055 (replace 'check
1056 (lambda _
1057 (setenv "HOME" (getcwd))
1058 (invoke "pytest"))))))
1059 (inputs
1060 (list python-pyxdg password-store))
1061 (native-inputs
1062 (list python-pytest python-pytest-mock))
1063 (home-page "https://github.com/languitar/pass-git-helper")
1064 (synopsis "Git credential helper interfacing with pass")
1065 (description "pass-git-helper is a git credential helper which
1066 uses pass, the standard unix password manager, as the credential backend for
1067 your git repositories. This is achieved by explicitly defining mappings
1068 between hosts and entries in the password store.")
1069 (license license:lgpl3+)))
1070
1071 (define-public john-the-ripper-jumbo
1072 (let ((official-version "1.9.0")
1073 (jumbo-version "1"))
1074 (package
1075 (name "john-the-ripper-jumbo")
1076 (version (string-append official-version "-" jumbo-version))
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (string-append "http://www.openwall.com/john/j/john-"
1081 official-version "-jumbo-" jumbo-version ".tar.xz"))
1082 (sha256
1083 (base32
1084 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))))
1085 (build-system gnu-build-system)
1086 (native-inputs
1087 (list perl))
1088 (inputs
1089 (list gmp
1090 libpcap
1091 nss
1092 openssl
1093 python-wrapper
1094 ruby ; For genincstats.rb
1095 zlib))
1096 (arguments
1097 `(#:configure-flags
1098 (list "--with-systemwide"
1099 ;; Do not test for instruction set in configure, and do not
1100 ;; pass '-march=native' to gcc:
1101 "--disable-native-tests"
1102 "--disable-native-march"
1103 ,(string-append
1104 "--enable-simd="
1105 (let ((system (or (%current-target-system)
1106 (%current-system))))
1107 (cond
1108 ((or (string-prefix? "x86_64" system)
1109 (string-prefix? "i686" system)) "sse2")
1110 ((string-prefix? "aarch" system) "neon")
1111 (else "no")))))
1112 #:phases
1113 (modify-phases %standard-phases
1114 (add-before 'configure 'chdir-src
1115 (lambda _ (chdir "src") #t))
1116 (replace 'install
1117 (lambda _
1118 (let ((bindir (string-append %output "/bin"))
1119 (docdir (string-append %output "/share/doc/john"))
1120 (execdir (string-append %output "/libexec/john"))
1121 (datadir (string-append %output "/share/john"))
1122 (install-file-to (lambda (dir)
1123 (lambda (f) (install-file f dir))))
1124 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
1125 (with-directory-excursion "../run"
1126 (for-each (install-file-to bindir)
1127 (cons*
1128 "john" "makechr" "cprepair" "SIPdump" "tgtsnarf"
1129 "genmkvpwd" "mkvcalcproba" "calc_stat" "raw2dyna"
1130 (find-files "." "(to|2)?john(-[^.]*)?$")))
1131 (for-each (lambda (f) ; Install symlinked aliases
1132 (let ((tgt (string-append bindir "/" (basename f))))
1133 ;; The use of install-file above dereferences
1134 ;; symlinks. We'd rather have the symlinks
1135 ;; for clarity, so remove tgt before linking.
1136 (when (file-exists? tgt) (delete-file tgt))
1137 (symlink "john" tgt)))
1138 (find-files "." symlink?))
1139 (for-each (install-file-to execdir)
1140 (cons* "mailer" "benchmark-unify" "relbench"
1141 (find-files "." ".*\\.js")))
1142 (for-each (lambda (f)
1143 (let* ((base (basename f))
1144 (name (substring base 0 (string-index base #\.)))
1145 (link (string-append bindir "/" name)))
1146 (install-file f execdir)
1147 (when (and (executable-file? f)
1148 (not (file-exists? link)))
1149 (symlink (string-append execdir "/" base) link))))
1150 (find-files "." ".*\\.(pl|py|rb|lua)"))
1151 (for-each (install-file-to datadir)
1152 (append (find-files "." "(stats|dictionary.*)")
1153 (find-files "." "(.*\\.chr|.*\\.lst)")
1154 (find-files "." ".*\\.conf")))
1155 (copy-recursively "rules" (string-append datadir "/rules")))
1156 (copy-recursively "../doc" docdir))))
1157 (delete 'check) ; Tests need installed .conf files; move after install
1158 (add-after 'install 'check
1159 (lambda args
1160 (setenv "HOME" "/tmp") ; Some tests need to write to ~/.john
1161 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
1162 (apply (assoc-ref %standard-phases 'check) args))))))
1163 (home-page "http://www.openwall.com/john/")
1164 (synopsis "Password cracker")
1165 (description "John the Ripper is a fast password cracker. Its primary
1166 purpose is to detect weak Unix passwords. Besides several @code{crypt}
1167 password hash types most commonly found on various Unix systems, supported out
1168 of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
1169 is the community-enhanced, \"jumbo\" version of John the Ripper.")
1170 (license license:gpl2+))))
1171
1172 (define-public fpm2
1173 (package
1174 (name "fpm2")
1175 (version "0.79")
1176 (source (origin
1177 (method url-fetch)
1178 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
1179 version ".tar.bz2"))
1180 (sha256
1181 (base32
1182 "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
1183 (build-system gnu-build-system)
1184 (inputs `(("gtk2" ,gtk+-2)
1185 ("gnupg" ,gnupg)
1186 ("libxml2" ,libxml2)))
1187 (native-inputs (list pkg-config intltool))
1188 (arguments
1189 `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")
1190 #:phases
1191 (modify-phases %standard-phases
1192 (add-before 'configure 'pre-configure
1193 ;; The file po/POTFILES.in ends up missing for some reason in
1194 ;; both nix and guix builds. Adding the file with contents
1195 ;; found during troubleshooting.
1196 (lambda _
1197 (call-with-output-file "po/POTFILES.in"
1198 (lambda (port)
1199 (format port "data/fpm2.desktop.in
1200 data/fpm2.desktop.in.in
1201 fpm2.glade
1202 src/callbacks.c
1203 src/fpm.c
1204 src/fpm_file.c
1205 src/interface.c
1206 src/support.c
1207 fpm2.glade
1208 ")))
1209 #t)))))
1210 (synopsis "Manage, generate and store passwords encrypted")
1211 (description "FPM2 is GTK2 port from Figaro's Password Manager
1212 originally developed by John Conneely, with some new enhancements.
1213
1214 Upstream development seems to have stopped. It is therefore recommended
1215 to use a different password manager.")
1216 (home-page "https://als.regnet.cz/fpm2/")
1217 (license license:gpl2+)))
1218
1219 (define-public pass-rotate
1220 (package
1221 (name "pass-rotate")
1222 (version "0.1")
1223 (source
1224 (origin
1225 (method git-fetch)
1226 (uri (git-reference
1227 (url "https://github.com/ddevault/pass-rotate")
1228 (commit version)))
1229 (file-name (git-file-name name version))
1230 (sha256
1231 (base32
1232 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
1233 (build-system python-build-system)
1234 (inputs
1235 (list python-beautifulsoup4 python-docopt python-html5lib
1236 python-requests))
1237 (home-page "https://github.com/ddevault/pass-rotate")
1238 (synopsis "Rotate password on online services")
1239 (description "pass-rotate is a command line utility and python library for
1240 rotating passwords on various web services. It makes it easier to rotate your
1241 passwords, one at a time or in bulk, when security events or routine upkeep of
1242 your online accounts makes it necessary.")
1243 (license license:expat)))
1244
1245 (define-public hashcat
1246 (package
1247 (name "hashcat")
1248 (version "6.2.5")
1249 (source (origin
1250 (method url-fetch)
1251 (uri (string-append "https://hashcat.net/files/hashcat-" version
1252 ".tar.gz"))
1253 (sha256
1254 (base32
1255 "0sc96xcsc20xd4fyby3i45nm9as3hl4nhk9snkvmk5l9mpbrjs3g"))
1256 (modules '((guix build utils)))
1257 ;; Delete bundled libraries.
1258 (snippet
1259 ;; TODO: Unbundle LZMA-SDK as well
1260 #~(for-each delete-file-recursively
1261 '("deps/zlib" "deps/xxHash" "deps/OpenCL-Headers")))))
1262 (inputs (list minizip opencl-headers xxhash zlib))
1263 (build-system gnu-build-system)
1264 (arguments
1265 (list #:tests? #f ;no tests
1266 #:make-flags #~(list (string-append "PREFIX=" #$output)
1267 (string-append "AR=" #$(ar-for-target))
1268 (string-append "CC=" #$(cc-for-target))
1269 (string-append "USE_SYSTEM_ZLIB=1")
1270 (string-append "USE_SYSTEM_OPENCL=1")
1271 (string-append "USE_SYSTEM_XXHASH=1"))
1272 #:phases #~(modify-phases %standard-phases
1273 (add-after 'unpack 'fix-reproducibility
1274 (lambda _
1275 (substitute* "src/Makefile"
1276 (("\\$\\(shell date \\+%s\\)")
1277 "0"))))
1278 (delete 'configure))))
1279 (home-page "https://hashcat.net/hashcat/")
1280 (synopsis "Advanced password recovery utility")
1281 (description
1282 "Hashcat is an password recovery utility, supporting five
1283 unique modes of attack for over 200 highly-optimized hashing algorithms.
1284 Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
1285 Linux, Windows, and macOS, and has facilities to help enable distributed
1286 password cracking.")
1287 (license license:expat)))
1288
1289 (define-public hashcat-utils
1290 (package
1291 (name "hashcat-utils")
1292 (version "1.9")
1293 (source
1294 (origin
1295 (method url-fetch)
1296 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
1297 "download/v" version "/"
1298 "hashcat-utils-" version ".7z"))
1299 (sha256
1300 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
1301 (native-inputs
1302 (list p7zip))
1303 (inputs
1304 (list perl))
1305 (build-system gnu-build-system)
1306 (arguments
1307 `(#:tests? #f ;no tests
1308 #:make-flags (list "CC=gcc"
1309 ;; Upstream bug(?): "make all" seems to remove the
1310 ;; Perl scripts from the source.
1311 "native")
1312 #:phases
1313 (modify-phases %standard-phases
1314 (replace 'unpack
1315 (lambda* (#:key source #:allow-other-keys)
1316 (invoke "7z" "x" source)
1317 (chdir (string-append "hashcat-utils-" ,version "/src"))
1318 #t))
1319 (delete 'configure)
1320 (replace 'install
1321 (lambda* (#:key outputs #:allow-other-keys)
1322 (let ((out (string-append (assoc-ref outputs "out") "/bin")))
1323 (mkdir-p out)
1324 (for-each
1325 (lambda (file)
1326 (copy-file file (string-append out "/"
1327 (basename file ".bin"))))
1328 (find-files "." "\\.bin$"))
1329 (for-each
1330 (lambda (file)
1331 (copy-file file (string-append out "/"
1332 (basename file ".pl"))))
1333 (find-files "../bin" "\\.pl$"))
1334 #t))))))
1335 (home-page "https://github.com/hashcat/hashcat-utils/")
1336 (synopsis "Small utilities that are useful in advanced password cracking")
1337 (description "Hashcat-utils are a set of small utilities that are useful
1338 in advanced password cracking. They all are packed into multiple stand-alone
1339 binaries. All of these utils are designed to execute only one specific
1340 function. Since they all work with @code{STDIN} and @code{STDOUT} you can
1341 group them into chains.")
1342 (license license:expat)))
1343
1344 (define-public bruteforce-luks
1345 (package
1346 (name "bruteforce-luks")
1347 (version "1.4.0")
1348 (source
1349 (origin
1350 (method url-fetch)
1351 (uri (string-append "https://github.com/glv2/bruteforce-luks/releases/download/"
1352 version
1353 "/bruteforce-luks-"
1354 version
1355 ".tar.lz"))
1356 (sha256
1357 (base32 "0yawrlbbklhmvwr99wm7li3r0d5kxvpkwf33a12rji7z0ya5p340"))))
1358 (build-system gnu-build-system)
1359 (native-inputs
1360 (list lzip))
1361 (inputs
1362 (list cryptsetup))
1363 (synopsis "LUKS encrypted volume cracker")
1364 (description
1365 "This is a cracker for LUKS encrypted volumes. It can be used either in
1366 exhaustive mode to try every password given a charset or in dictionary mode to
1367 try every password contained in a file.")
1368 (home-page "https://github.com/glv2/bruteforce-luks")
1369 (license license:gpl3+)))
1370
1371 (define-public makepasswd
1372 (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
1373 (revision "1"))
1374 (package
1375 (name "makepasswd")
1376 (version (git-version "0.5.4" revision commit))
1377 (source
1378 (origin
1379 (method git-fetch)
1380 (uri (git-reference
1381 (url "https://github.com/khorben/makepasswd")
1382 (commit commit)))
1383 (file-name (git-file-name name version))
1384 (sha256
1385 (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
1386 (build-system gnu-build-system)
1387 (native-inputs
1388 (list pkg-config libxslt libxml2 docbook-xsl docbook-xml))
1389 (inputs
1390 (list openssl))
1391 (arguments
1392 `(#:phases
1393 (modify-phases %standard-phases
1394 (delete 'configure))
1395 #:make-flags (list "CC=gcc"
1396 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1397 #:tests? #f)) ;no tests
1398 (synopsis "Generate (pseudo-)random passwords and hashes")
1399 (description
1400 "Makepasswd is a program that generates pseudo-random passwords of a
1401 desired length. It can also generate their corresponding hashes for a given
1402 encryption algorithm if so desired.")
1403 (home-page "https://github.com/khorben/makepasswd")
1404 (license license:gpl3))))
1405
1406 (define-public pass-tomb
1407 (package
1408 (name "pass-tomb")
1409 (version "1.3")
1410 (source
1411 (origin
1412 (method git-fetch)
1413 (uri (git-reference
1414 (url "https://github.com/roddhjav/pass-tomb")
1415 (commit (string-append "v" version))))
1416 (file-name (git-file-name name version))
1417 (sha256
1418 (base32 "1sjkbdm2i3v77nbnap8sypbfdqwxckc8h66g3ixjnyr6cqgcrdli"))))
1419 (build-system gnu-build-system)
1420 (arguments
1421 `(#:make-flags
1422 (let ((out (assoc-ref %outputs "out")))
1423 (list (string-append "PREFIX=" out)
1424 (string-append "BASHCOMPDIR=" out "/etc/bash_completion.d")))
1425 #:test-target "tests"
1426 ;; tests are very dependent on system state (swap partition) and require
1427 ;; access to /tmp/zsh which is not in the build container.
1428 #:tests? #f
1429 #:phases
1430 (modify-phases %standard-phases
1431 (add-after 'unpack 'set-tomb-path
1432 (lambda* (#:key inputs #:allow-other-keys)
1433 (let ((tomb (assoc-ref inputs "tomb")))
1434 (substitute* "tomb.bash"
1435 ((":-tomb")
1436 (string-append ":-" tomb "/bin/tomb"))))))
1437 (delete 'configure))))
1438 (inputs
1439 (list tomb))
1440 (home-page "https://github.com/roddhjav/pass-tomb")
1441 (synopsis "Pass extension keeping the tree of passwords encrypted")
1442 (description "Pass-tomb provides a convenient solution to put your
1443 password store in a Tomb and then keep your password tree encrypted when you
1444 are not using it. It uses the same GPG key to encrypt passwords and tomb,
1445 therefore you don't need to manage more key or secret. Moreover, you can ask
1446 pass-tomb to automatically close your store after a given time.")
1447 (license license:gpl3+)))