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