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