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