gnu: dcmtk: Update to 3.6.6.
[jackhill/guix/guix.git] / gnu / packages / password-utils.scm
CommitLineData
de63b20e
SS
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
e1a94fe0 3;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
7e9b07bd 4;;; Copyright © 2015 Aljosha Papsch <misc@rpapsch.de>
3d4f9d5c 5;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
c285a400
JT
6;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se>
7;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
6d32dd8c 8;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
63299f28 9;;; Copyright © 2016, 2019, 2020 Alex Griffin <a@ajgrf.com>
f339f277 10;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
60628f54 11;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
e48cdbb9 12;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
a1714ff5 13;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
e57c7dd7 14;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
aae32847 15;;; Copyright © 2017, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
763269f9 16;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
dcf12172 17;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
c06bf6a3 18;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
649eb8b5 19;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
d4e0ebd0 20;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net>
20b51b17 21;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
4715f92e 22;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
037d1851 23;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
9b572aba 24;;; Copyright © 2018, 2019, 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
872da48e 25;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
f59ea3a7 26;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
d823fd96 27;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
df931ac3 28;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
b2b9b227 29;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org>
4af67aa2 30;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
9cd61289 31;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
33a212bf 32;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
de63b20e
SS
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:)
e8647227 51 #:use-module (guix build-system cmake)
de63b20e 52 #:use-module (guix build-system gnu)
63299f28 53 #:use-module (guix build-system go)
f59ea3a7 54 #:use-module (guix build-system trivial)
de63b20e 55 #:use-module (guix download)
7d4b3e1e 56 #:use-module (guix git-download)
e8647227 57 #:use-module (guix packages)
53dcbbec 58 #:use-module (gnu packages)
c285a400 59 #:use-module (gnu packages admin)
81635fb6 60 #:use-module (gnu packages aidc)
54b41d2d 61 #:use-module (gnu packages authentication)
33a212bf 62 #:use-module (gnu packages autotools)
c285a400 63 #:use-module (gnu packages base)
ac257f12 64 #:use-module (gnu packages check)
e8647227 65 #:use-module (gnu packages compression)
da1b30bd 66 #:use-module (gnu packages crypto)
d823fd96 67 #:use-module (gnu packages cryptsetup)
da1b30bd 68 #:use-module (gnu packages curl)
b2b9b227 69 #:use-module (gnu packages docbook)
7d4b3e1e 70 #:use-module (gnu packages file)
a1714ff5 71 #:use-module (gnu packages freedesktop)
7d4b3e1e 72 #:use-module (gnu packages gettext)
f339f277 73 #:use-module (gnu packages glib)
e8647227 74 #:use-module (gnu packages gnupg)
63299f28 75 #:use-module (gnu packages golang)
0050876b 76 #:use-module (gnu packages gtk)
dd24e906 77 #:use-module (gnu packages guile)
eb28a777 78 #:use-module (gnu packages kerberos)
0751fddd 79 #:use-module (gnu packages libffi)
c285a400 80 #:use-module (gnu packages linux)
3d4f9d5c 81 #:use-module (gnu packages man)
eb28a777 82 #:use-module (gnu packages multiprecision)
7e9b07bd 83 #:use-module (gnu packages ncurses)
aff0cce9 84 #:use-module (gnu packages nss)
c10aa278 85 #:use-module (gnu packages opencl)
eb4ffe9b 86 #:use-module (gnu packages perl)
7e9b07bd 87 #:use-module (gnu packages pkg-config)
3d4f9d5c 88 #:use-module (gnu packages python)
20b51b17 89 #:use-module (gnu packages python-web)
44d10b1f 90 #:use-module (gnu packages python-xyz)
24adcbab 91 #:use-module (gnu packages readline)
e57c7dd7 92 #:use-module (gnu packages ruby)
24adcbab 93 #:use-module (gnu packages security-token)
177475cf 94 #:use-module (gnu packages suckless)
54b41d2d 95 #:use-module (gnu packages tcl)
7e9b07bd 96 #:use-module (gnu packages tls)
e8647227 97 #:use-module (gnu packages qt)
c285a400 98 #:use-module (gnu packages version-control)
7d4b3e1e 99 #:use-module (gnu packages wxwidgets)
dd24e906 100 #:use-module (gnu packages xdisorg)
3d4f9d5c 101 #:use-module (gnu packages xorg)
d4e0ebd0 102 #:use-module (gnu packages xml)
3d4f9d5c 103 #:use-module (guix build-system python))
de63b20e
SS
104
105(define-public pwgen
106 (package
107 (name "pwgen")
5a2c4b3b 108 (version "2.08")
de63b20e
SS
109 (source
110 (origin
111 (method url-fetch)
de67e922
LF
112 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
113 "/pwgen-" version ".tar.gz"))
de63b20e 114 (sha256
5a2c4b3b 115 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
de63b20e
SS
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
122human.")
123 (license license:gpl2)))
e8647227 124
99672f7b
EF
125(define-public keepassxc
126 (package
127 (name "keepassxc")
aae32847 128 (version "2.6.4")
99672f7b
EF
129 (source
130 (origin
131 (method url-fetch)
e2d14ee9 132 (uri (string-append "https://github.com/keepassxreboot/keepassxc"
99672f7b
EF
133 "/releases/download/" version "/keepassxc-"
134 version "-src.tar.xz"))
135 (sha256
aae32847 136 (base32 "0azq20rqsx7axrigha4qh81ipvhqnnlb27w3xdjg5z4h3jky4dp5"))))
99672f7b 137 (build-system cmake-build-system)
da1b30bd 138 (arguments
24adcbab 139 '(#:configure-flags '("-DWITH_XC_ALL=YES"
074814fe
JL
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)))))
d1279853
NG
153 (native-inputs
154 `(("asciidoctor" ,ruby-asciidoctor)
155 ("qttools" ,qttools)))
99672f7b 156 (inputs
3374dcc7
EF
157 `(("argon2" ,argon2)
158 ("libgcrypt" ,libgcrypt)
0e5d66ab 159 ("libsodium" ,libsodium) ; XC_BROWSER
24adcbab 160 ("libyubikey" ,libyubikey) ; XC_YUBIKEY
99672f7b
EF
161 ("libxi" ,libxi)
162 ("libxtst" ,libxtst)
0f3794fb 163 ("qrencode" ,qrencode)
99672f7b 164 ("qtbase" ,qtbase)
0f3794fb 165 ("qtsvg" ,qtsvg)
99672f7b 166 ("qtx11extras" ,qtx11extras)
24adcbab
EF
167 ("quazip" ,quazip) ; XC_KEESHARE
168 ("readline" ,readline)
169 ("yubikey-personalization" ,yubikey-personalization) ; XC_YUBIKEY
99672f7b 170 ("zlib" ,zlib)))
99672f7b
EF
171 (home-page "https://www.keepassxc.org")
172 (synopsis "Password manager")
173 (description "KeePassXC is a password manager or safe which helps you to
174manage your passwords in a secure way. You can put all your passwords in one
175database, which is locked with one master key or a key-file which can be stored
176on an external storage device. The databases are encrypted using the
177algorithms AES or Twofish.")
24adcbab
EF
178 ;; While various parts of the software are licensed under different licenses,
179 ;; the combined work falls under the GPLv3.
99672f7b
EF
180 (license license:gpl3)))
181
e8647227
EF
182(define-public keepassx
183 (package
184 (name "keepassx")
a00fbe8a 185 (version "2.0.3")
e8647227
EF
186 (source
187 (origin
188 (method url-fetch)
e5be0e01
EF
189 (uri (string-append "https://www.keepassx.org/releases/" version
190 "/keepassx-" version ".tar.gz"))
e8647227 191 (sha256
2c5e4976 192 (base32
a00fbe8a 193 "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
e8647227
EF
194 (build-system cmake-build-system)
195 (inputs
196 `(("libgcrypt" ,libgcrypt)
a00fbe8a 197 ("libxi" ,libxi)
e8647227
EF
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
205manage your passwords in a secure way. You can put all your passwords in one
206database, which is locked with one master key or a key-file which can be stored
207on an external storage device. The databases are encrypted using the
208algorithms AES or Twofish.")
209 ;; Non functional parts use various licences.
b7ac10e6
EF
210 (license license:gpl3)
211 (properties `((superseded . ,keepassxc)))))
dd24e906 212
7d4b3e1e
TG
213(define-public pwsafe
214 (package
215 (name "pwsafe")
2dfacc1d 216 (version "3.54.1")
747aa6c4 217 (home-page "https://www.pwsafe.org/")
7d4b3e1e
TG
218 (source
219 (origin
220 (method git-fetch)
221 (uri (git-reference
b0e7b699 222 (url "https://github.com/pwsafe/pwsafe")
7d4b3e1e 223 (commit version)))
747aa6c4 224 (sha256
2dfacc1d 225 (base32 "0d51dlw98mv23nwb0b5jyji8gnb9f5cnig6kivfljl97lmr6lhvf"))
747aa6c4 226 (file-name (git-file-name name version))))
7d4b3e1e 227 (build-system cmake-build-system)
50bfb70b
EF
228 (native-inputs
229 `(("gettext" ,gettext-minimal)
230 ("gtest" ,googletest)
231 ("perl" ,perl)
232 ("zip" ,zip)))
7d4b3e1e
TG
233 (inputs `(("curl" ,curl)
234 ("file" ,file)
bb93042c 235 ("libuuid" ,util-linux "lib")
7d4b3e1e
TG
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)
250add_subdirectory(src/test)\n" cmake-port)
251 (close cmake-port)
9b572aba 252 #t))))))
7d4b3e1e
TG
253 (synopsis "Password safe with automatic input and key generation")
254 (description "pwsafe is a password manager originally designed by Bruce
255Schneier. It offers a simple UI to manage passwords for different services.
256There are other programs that support the file format on different
257platforms.")
258 (license license:artistic2.0)))
259
33a212bf
SR
260(define-public pwsafe-cli
261 (let ((commit "c49a0541b66647ad04d19ddb351d264054c67759")
262 (revision "0"))
263 (package
264 (name "pwsafe-cli")
b158341d 265 (version (git-version "0.2.0" revision commit))
33a212bf
SR
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
aac6dd5b
NG
278 ;; FIXME: skip failing test suite (requires write access to /tmp),
279 ;; patching path does not help somehow.
280 `(#:tests? #f
33a212bf
SR
281 #:phases
282 (modify-phases %standard-phases
aac6dd5b
NG
283 (replace 'bootstrap
284 (lambda _
285 (invoke "aclocal")
286 (invoke "autoheader")
287 (invoke "automake" "--add-missing")
288 (invoke "autoconf")
289 #t)))))
33a212bf
SR
290 (native-inputs
291 `(("autoconf" ,autoconf)
292 ("automake" ,automake)))
293 (inputs
aac6dd5b
NG
294 `(("libx11" ,libx11)
295 ("libxmu" ,libxmu)
33a212bf 296 ("libxt" ,libxt)
aac6dd5b 297 ("openssl" ,openssl)))
33a212bf
SR
298 (home-page "https://github.com/nsd20463/pwsafe")
299 (synopsis "CLI password manager")
aac6dd5b
NG
300 (description
301 "@command{pwsafe} is a command line tool compatible with
302Counterpane's Passwordsafe.")
484c5659 303 (license license:gpl2+))))
33a212bf 304
dd24e906
DT
305(define-public shroud
306 (package
307 (name "shroud")
7dff3225 308 (version "0.1.2")
dd24e906
DT
309 (source (origin
310 (method url-fetch)
a652eb93 311 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
dd24e906
DT
312 version ".tar.gz"))
313 (sha256
314 (base32
7dff3225 315 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
dd24e906 316 (build-system gnu-build-system)
7dff3225
AS
317 (native-inputs
318 `(("pkg-config" ,pkg-config)))
df0e8a23 319 (arguments
7dff3225
AS
320 `(#:modules ((guix build gnu-build-system)
321 (guix build utils)
322 (ice-9 popen)
323 (ice-9 rdelim))
324 #:phases
df0e8a23
SB
325 (modify-phases %standard-phases
326 (add-after 'install 'wrap-shroud
7dff3225 327 (lambda* (#:key inputs outputs #:allow-other-keys)
df0e8a23 328 (let* ((out (assoc-ref outputs "out"))
7dff3225
AS
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"))
df0e8a23
SB
336 (prog (string-append out "/bin/shroud")))
337 (wrap-program prog
338 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
339 #t))))))
dd24e906 340 (inputs
7dff3225 341 `(("guile" ,guile-2.2)
dd24e906
DT
342 ("gnupg" ,gnupg)
343 ("xclip" ,xclip)))
344 (synopsis "GnuPG-based secret manager")
345 (description "Shroud is a simple secret manager with a command line
346interface. The password database is stored as a Scheme s-expression and
347encrypted with a GnuPG key. Secrets consist of an arbitrary number of
348key/value pairs, making Shroud suitable for more than just password storage.
349For copying and pasting secrets into web browsers and other graphical
350applications, there is xclip integration." )
59d915ac 351 (home-page "https://dthompson.us/projects/shroud.html")
dd24e906 352 (license license:gpl3+)))
7e9b07bd
AP
353
354(define-public yapet
355 (package
356 (name "yapet")
1385ac55 357 (version "2.5")
988f53e1
TGR
358 (source
359 (origin
360 (method url-fetch)
361 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
362 version ".tar.xz"))
363 (sha256
1385ac55 364 (base32 "0hpibsdry259cmvps35isr6jn9cd9fsk3r1h0ppjx9zxfrpqwldg"))))
7e9b07bd 365 (build-system gnu-build-system)
5fb085da
TGR
366 (arguments
367 `(#:configure-flags
368 (list (string-append "--docdir=" (assoc-ref %outputs "out")
369 "/share/doc",name "-" ,version))))
7e9b07bd 370 (inputs
988f53e1
TGR
371 `(("argon2" ,argon2)
372 ("ncurses" ,ncurses)
7e9b07bd
AP
373 ("openssl" ,openssl)))
374 (native-inputs
988f53e1
TGR
375 `(("cppunit" ,cppunit)
376 ("pkg-config" ,pkg-config)))
7e9b07bd
AP
377 (synopsis "Yet Another Password Encryption Tool")
378 (description "YAPET is a text based password manager using the Blowfish
379encryption algorithm. Because of its small footprint and very few library
380dependencies, it is suited for installing on desktop and server systems alike.
381The text based user interface allows you to run YAPET easily in a Secure Shell
382session. Two companion utilities enable users to convert CSV files to YAPET
383and vice versa.")
3fc0b54e 384 (home-page "https://yapet.guengel.ch/")
7e9b07bd 385 (license license:gpl3+)))
72029c8b
SB
386
387(define-public cracklib
388 (package
389 (name "cracklib")
9081333b
TGR
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"))))
72029c8b 399 (build-system gnu-build-system)
27faad22
FP
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))))))
72029c8b
SB
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
b1a686bb
TGR
413@command{passwd}-like program. The idea is simple: try to prevent users from
414choosing passwords that could easily be guessed (or \"cracked\") by filtering
415them out, at the source.")
72029c8b 416 (license license:lgpl2.1)))
c2fb2076
SB
417
418(define-public libpwquality
419 (package
420 (name "libpwquality")
485ee063 421 (version "1.4.4")
c2fb2076
SB
422 (source (origin
423 (method url-fetch)
424 (uri (list
2f6a158b
TGR
425 (string-append "https://github.com/libpwquality/libpwquality"
426 "/releases/download/libpwquality-" version
427 "/libpwquality-" version ".tar.bz2")
c2fb2076
SB
428 (string-append "https://launchpad.net/libpwquality/trunk/"
429 version "/+download/"
2f6a158b 430 "libpwquality-" version ".tar.bz2")))
c2fb2076
SB
431 (sha256
432 (base32
485ee063 433 "0id5a8bi8xnjg11g9vzrl2xbpx65mfxclxcvis7zx1v8vhisyfyl"))))
c2fb2076
SB
434 (build-system gnu-build-system)
435 (arguments
9cd61289
VM
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)))
c2fb2076
SB
447 (inputs
448 `(("cracklib" ,cracklib)))
449 (synopsis "Password quality checker")
c18594dd 450 (home-page "https://github.com/libpwquality/libpwquality")
c2fb2076
SB
451 (description
452 "Libpwquality is a library for password quality checking and generation of
453random passwords that pass the checks.")
454 (license license:gpl2+)))
3d4f9d5c
CAW
455
456(define-public assword
457 (package
458 (name "assword")
d504de26 459 (version "0.11")
3d4f9d5c
CAW
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
d504de26 468 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
3d4f9d5c 469 (arguments
f339f277 470 `(;; irritatingly, tests do run but not there are two problems:
3d4f9d5c
CAW
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
0050876b
SB
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)))
3d4f9d5c
CAW
490 (add-after 'install 'manpage
491 (lambda* (#:key outputs #:allow-other-keys)
3692cffe
RW
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")))))))
3d4f9d5c
CAW
500 (build-system python-build-system)
501 (native-inputs
f339f277 502 `(("txt2man" ,txt2man)))
3d4f9d5c 503 (inputs
0050876b
SB
504 `(("gtk+" ,gtk+)
505 ("python-xdo" ,python-xdo)
f339f277
LF
506 ("python-gpg" ,python-gpg)
507 ("python-pygobject" ,python-pygobject)))
3d4f9d5c
CAW
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
513JSON files. It has a command line interface as well as a very simple
514graphical interface, which can even \"type\" your passwords into
515any X11 window.")
516 (license license:gpl3+)))
c285a400
JT
517
518(define-public password-store
519 (package
520 (name "password-store")
3e9aa5cf 521 (version "1.7.3")
c285a400
JT
522 (source (origin
523 (method url-fetch)
524 (uri
525 (string-append "https://git.zx2c4.com/password-store/snapshot/"
526 name "-" version ".tar.xz"))
527 (sha256
528 (base32
3e9aa5cf 529 "1x53k5dn3cdmvy8m4fqdld4hji5n676ksl0ql4armkmsds26av1b"))))
c285a400
JT
530 (build-system gnu-build-system)
531 (arguments
532 '(#:phases
533 (modify-phases %standard-phases
534 (delete 'configure)
619f98fa 535 (delete 'build)
55541556
AG
536 (add-before 'install 'patch-system-extension-dir
537 (lambda* (#:key outputs #:allow-other-keys)
538 (let* ((out (assoc-ref outputs "out"))
539 (extension-dir (string-append out "/lib/password-store/extensions")))
540 (substitute* "src/password-store.sh"
541 (("^SYSTEM_EXTENSION_DIR=.*$")
542 ;; lead with whitespace to prevent 'make install' from
543 ;; overwriting it again
544 (string-append " SYSTEM_EXTENSION_DIR=\""
545 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
546 extension-dir
547 "}\"\n"))))
548 #t))
177475cf
JL
549 (add-before 'install 'patch-passmenu-path
550 (lambda* (#:key inputs #:allow-other-keys)
551 (substitute* "contrib/dmenu/passmenu"
552 (("dmenu") (string-append (assoc-ref inputs "dmenu")
553 "/bin/dmenu"))
554 (("xdotool") (string-append (assoc-ref inputs "xdotool")
555 "/bin/xdotool")))
556 #t))
557 (add-after 'install 'install-passmenu
558 (lambda* (#:key outputs #:allow-other-keys)
e9ce6425
TGR
559 (let* ((out (assoc-ref outputs "out"))
560 (bin (string-append out "/bin")))
561 (install-file "contrib/dmenu/passmenu" bin)
177475cf 562 #t)))
61201e46
AG
563 (add-after 'install 'wrap-path
564 (lambda* (#:key inputs outputs #:allow-other-keys)
565 (let ((out (assoc-ref outputs "out"))
566 (path (map (lambda (pkg)
567 (string-append (assoc-ref inputs pkg) "/bin"))
81635fb6 568 '("coreutils" "getopt" "git" "gnupg" "qrencode"
61201e46
AG
569 "sed" "tree" "which" "xclip"))))
570 (wrap-program (string-append out "/bin/pass")
718c1278 571 `("PATH" ":" prefix (,(string-join path ":"))))
718c1278 572 #t))))
df931ac3
BW
573 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
574 "WITH_ALLCOMP=yes"
575 (string-append "BASHCOMPDIR="
576 %output "/etc/bash_completion.d"))
a77f0360
CB
577 ;; Parallel tests may cause a race condition leading to a
578 ;; timeout in some circumstances.
579 #:parallel-tests? #f
c285a400 580 #:test-target "test"))
55541556
AG
581 (native-search-paths
582 (list (search-path-specification
583 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
869a4c0f 584 (separator #f) ;single entry
55541556 585 (files '("lib/password-store/extensions")))))
61201e46 586 (inputs
177475cf
JL
587 `(("dmenu" ,dmenu)
588 ("getopt" ,util-linux)
61201e46
AG
589 ("git" ,git)
590 ("gnupg" ,gnupg)
81635fb6 591 ("qrencode" ,qrencode)
61201e46
AG
592 ("sed" ,sed)
593 ("tree" ,tree)
594 ("which" ,which)
177475cf
JL
595 ("xclip" ,xclip)
596 ("xdotool" ,xdotool)))
62ab60aa 597 (home-page "https://www.passwordstore.org/")
c285a400
JT
598 (synopsis "Encrypted password manager")
599 (description "Password-store is a password manager which uses GnuPG to
600store and retrieve passwords. The tool stores each password in its own
601GnuPG-encrypted file, allowing the program to be simple yet secure.
602Synchronization is possible using the integrated git support, which commits
603changes to your password database to a git repository that can be managed
604through the pass command.")
605 (license license:gpl2+)))
6d32dd8c 606
54b41d2d
AG
607(define-public pass-otp
608 (package
609 (name "pass-otp")
610 (version "1.2.0")
611 (source
612 (origin
613 (method url-fetch)
614 (uri
615 (string-append "https://github.com/tadfisher/pass-otp/releases/"
616 "download/v" version "/pass-otp-" version ".tar.gz"))
617 (sha256
618 (base32
619 "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
620 (build-system gnu-build-system)
621 (arguments
622 '(#:make-flags
623 (let* ((out (assoc-ref %outputs "out"))
624 (bashcomp (string-append out "/etc/bash_completion.d")))
625 (list (string-append "PREFIX=" %output)
626 (string-append "BASHCOMPDIR=" bashcomp)))
627 #:phases
628 (modify-phases %standard-phases
629 (delete 'configure)
630 (add-after 'build 'patch-oath-path
631 (lambda* (#:key inputs #:allow-other-keys)
632 (substitute* "otp.bash"
633 (("^OATH=.*$")
634 (string-append
635 "OATH="
636 (assoc-ref inputs "oath-toolkit")
637 "/bin/oathtool\n")))
638 #t)))
639 #:test-target "test"))
640 (inputs
641 `(("oath-toolkit" ,oath-toolkit)))
642 (native-inputs
643 `(("password-store" ,password-store)
644 ("expect" ,expect)
645 ("git" ,git)
646 ("gnupg" ,gnupg)
647 ("which" ,which)))
648 (home-page "https://github.com/tadfisher/pass-otp")
649 (synopsis "Pass extension for managing one-time-password (OTP) tokens")
650 (description
651 "Pass OTP is an extension for password-store that allows adding
652one-time-password (OTP) secrets, generating OTP codes, and displaying secret
653key URIs using the standard otpauth:// scheme.")
654 (license license:gpl3+)))
655
872da48e
JM
656(define-public qtpass
657 (package
658 (name "qtpass")
e1e9baf2 659 (version "1.3.2")
872da48e
JM
660 (source
661 (origin
662 (method git-fetch)
663 (uri (git-reference
b0e7b699 664 (url "https://github.com/IJHack/QtPass")
872da48e
JM
665 (commit (string-append "v" version))))
666 (file-name (git-file-name name version))
667 (sha256
668 (base32
e1e9baf2 669 "0748hjvhjrybi33ci3c8hcr74k9pdrf5jv8npf9hrsrmdyy1kr9x"))))
872da48e
JM
670 (build-system gnu-build-system)
671 (arguments
73d9caba
EF
672 `(#:modules ((guix build gnu-build-system)
673 (guix build qt-utils)
674 (guix build utils))
675 #:imported-modules (,@%gnu-build-system-modules
676 (guix build qt-utils))
677 #:phases
872da48e
JM
678 (modify-phases %standard-phases
679 (replace 'configure
680 (lambda* (#:key inputs outputs #:allow-other-keys)
681 (let ((out (assoc-ref outputs "out")))
682 ;; lupdate/lrelease need to find qmake.
683 (setenv "QMAKE" "qmake")
684 ;; qmake needs to find lrelease/lupdate.
685 (invoke "qmake"
686 "QMAKE_LRELEASE=lrelease"
687 "QMAKE_LUPDATE=lupdate"
688 (string-append "PREFIX=" out)))))
689 (add-after 'configure 'reset-resource-timestamps
690 ;; Reset timestamps on localization files for a reproducible build.
691 (lambda _
692 (with-directory-excursion "localization"
693 (for-each (lambda (file)
694 (let* ((base (basename file ".qm"))
695 (src (string-append base ".ts"))
696 (st (stat src)))
697 (set-file-time file st)))
698 (find-files "." ".*\\.qm")))
699 #t))
700 (add-after 'install 'install-auxilliary
701 ;; Install man-page, icon and .desktop file.
702 (lambda* (#:key inputs outputs #:allow-other-keys)
703 (let* ((out (assoc-ref outputs "out"))
704 (applications (string-append out "/share/applications"))
705 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
706 (man (string-append out "/share/man/man1")))
707 (install-file "qtpass.desktop" applications)
708 (install-file "artwork/icon.svg" icons)
709 (rename-file (string-append icons "/icon.svg")
710 (string-append icons "/qtpass-icon.svg"))
711 (install-file "qtpass.1" man)
712 #t)))
73d9caba
EF
713 (add-after 'install 'wrap-qt
714 (lambda* (#:key outputs #:allow-other-keys)
715 (wrap-qt-program (assoc-ref outputs "out") "qtpass")
716 #t))
872da48e
JM
717 (add-before 'check 'check-setup
718 ;; Make Qt render "offscreen", required for tests.
719 (lambda _
720 (setenv "QT_QPA_PLATFORM" "offscreen")
721 #t)))))
722 (native-inputs
723 `(("qttools" ,qttools)))
724 (inputs
725 `(("qtbase" ,qtbase)
726 ("qtsvg" ,qtsvg)))
727 (home-page "https://qtpass.org")
728 (synopsis "GUI for password manager password-store")
729 (description
730 "Qt-based graphical user interface for the password manager
731password-store also known as pass. Can use either pass or gpg to interact
732with password-store files. Features configurable password generation,
733templates, clipboard handling, and per folder settings for multi-recipient
734encryption.")
735 (license license:gpl3+)))
736
f59ea3a7
TLC
737(define-public rofi-pass
738 (package
739 (name "rofi-pass")
740 (version "2.0.2")
741 (source
742 (origin
743 (method url-fetch)
744 (uri
745 (string-append "https://raw.githubusercontent.com/carnager/rofi-pass/"
746 version "/rofi-pass"))
747 (sha256
748 (base32 "0msldkndqp40nx1s5s7ggcr97ir4nshpmnyzvj5hqw1l7m3gvw6j"))
749 (file-name name)))
750 (build-system trivial-build-system)
751 (arguments
752 `(#:modules ((guix build utils))
753 #:builder
754 (begin
755 (use-modules (guix build utils))
756 (let ((source (string-append (assoc-ref %build-inputs "source")))
757 (script "rofi-pass")
758 (out (assoc-ref %outputs "out")))
759 (copy-file source script)
760 (chmod script #o555)
761 (install-file script (string-append out "/bin"))))))
762 (propagated-inputs
763 `(("password-store" ,password-store)
764 ("rofi" ,rofi)
765 ("xdotool" ,xdotool)))
766 (home-page "https://github.com/carnager/rofi-pass")
767 (synopsis "Rofi frontend for password-store")
768 (description "Rofi-pass provides a way to manipulate information stored
769using password-store through rofi interface:
770@enumerate
771@item open URLs of entries with hotkey;
772@item type any field from entry;
773@item auto-typing of user and/or password fields;
774@item auto-typing username based on path;
775@item auto-typing of more than one field, using the autotype entry;
776@item bookmarks mode (open stored URLs in browser, default: Alt+x).
777@end enumerate")
778 (license license:gpl3)))
779
63299f28
AG
780(define-public browserpass-native
781 (package
782 (name "browserpass-native")
291afa0f 783 (version "3.0.7")
63299f28
AG
784 (source
785 (origin
786 (method git-fetch)
787 (uri (git-reference
b0e7b699 788 (url "https://github.com/browserpass/browserpass-native")
63299f28
AG
789 (commit version)))
790 (file-name (git-file-name name version))
791 (sha256
792 (base32
291afa0f 793 "1jkjslbbac49xjyjkc2b07phdm3i64z40kh6h55cl22dxjmpp1nb"))))
63299f28
AG
794 (build-system go-build-system)
795 (arguments
796 `(#:import-path "github.com/browserpass/browserpass-native"
797 #:install-source? #f
798 #:phases
799 (modify-phases %standard-phases
800 (add-before 'build 'patch-makefile
801 (lambda* (#:key outputs #:allow-other-keys)
802 (let ((out (assoc-ref outputs "out")))
803 ;; This doesn't go in #:make-flags because the Makefile itself
804 ;; gets installed.
805 (substitute*
806 "src/github.com/browserpass/browserpass-native/Makefile"
807 (("PREFIX \\?= /usr")
808 (string-append "PREFIX ?= " out)))
809 #t)))
810 (add-before 'build 'configure
811 (lambda _
812 (with-directory-excursion
813 "src/github.com/browserpass/browserpass-native"
814 (invoke "make" "configure"))
815 #t))
816 (replace 'build
817 (lambda _
818 (with-directory-excursion
819 "src/github.com/browserpass/browserpass-native"
820 (invoke "make"))
821 #t))
822 (replace 'install
823 (lambda _
824 (with-directory-excursion
825 "src/github.com/browserpass/browserpass-native"
826 (invoke "make" "install"))
827 #t))
828 (add-after 'install 'wrap-executable
829 (lambda* (#:key inputs outputs #:allow-other-keys)
830 (let ((out (assoc-ref outputs "out"))
831 (gnupg (assoc-ref inputs "gnupg")))
832 (wrap-program (string-append out "/bin/browserpass")
833 `("PATH" ":" prefix
834 (,(string-append gnupg "/bin"))))
835 #t))))))
836 (native-inputs
837 `(("which" ,which)))
838 (inputs
839 `(("gnupg" ,gnupg)
840 ("go-github-com-mattn-go-zglob" ,go-github-com-mattn-go-zglob)
841 ("go-github-com-rifflock-lfshook" ,go-github-com-rifflock-lfshook)
842 ("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)
843 ("go-golang-org-x-sys" ,go-golang-org-x-sys)))
844 (home-page "https://github.com/browserpass/browserpass-native")
845 (synopsis "Browserpass native messaging host")
846 (description "Browserpass is a browser extension for pass, a
847UNIX-based password store manager. It allows you to auto-fill or copy to
848clipboard credentials for the current domain, protecting you from phishing
849attacks.
850
851This package only contains the Browserpass native messaging host. You must
852also install the browser extension for GNU IceCat or ungoogled-chromium
853separately.")
854 (license license:isc)))
855
6d32dd8c
LG
856(define-public argon2
857 (package
858 (name "argon2")
fe109349 859 (version "20190702")
6d32dd8c
LG
860 (source
861 (origin
c600cf2a
EF
862 (method git-fetch)
863 (uri (git-reference
864 (url "https://github.com/P-H-C/phc-winner-argon2")
865 (commit version)))
866 (file-name (git-file-name name version))
6d32dd8c
LG
867 (sha256
868 (base32
fe109349 869 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
6d32dd8c
LG
870 (build-system gnu-build-system)
871 (arguments
872 `(#:test-target "test"
fe109349
EF
873 #:make-flags (list "CC=gcc"
874 (string-append "PREFIX=" (assoc-ref %outputs "out"))
875 "LIBRARY_REL=lib"
876 (string-append "ARGON2_VERSION=" ,version)
877 "OPTTEST=1") ; disable CPU optimization
6d32dd8c
LG
878 #:phases
879 (modify-phases %standard-phases
fe109349 880 (delete 'configure)))) ; No configure script.
6d32dd8c
LG
881 (home-page "https://www.argon2.com/")
882 (synopsis "Password hashing library")
883 (description "Argon2 provides a key derivation function that was declared
884winner of the 2015 Password Hashing Competition.")
c06bf6a3
MB
885 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
886 ;; files are CC0 only; see README.md and LICENSE for details.
887 (license (list license:cc0 license:asl2.0))))
153e58c5 888
a1714ff5
JL
889(define-public pass-git-helper
890 (package
891 (name "pass-git-helper")
b70f9ad1 892 (version "1.1.0")
a1714ff5
JL
893 (source
894 (origin
df58cc9c
EF
895 (method git-fetch)
896 (uri (git-reference
897 (url "https://github.com/languitar/pass-git-helper")
b70f9ad1 898 (commit (string-append "v" version))))
df58cc9c 899 (file-name (git-file-name name version))
a1714ff5
JL
900 (sha256
901 (base32
b70f9ad1 902 "18nvwlp0w4aqj268wly60rnjzqw2d8jl0hbs6bkwp3hpzzz5g6yd"))))
a1714ff5
JL
903 (build-system python-build-system)
904 (arguments
905 `(#:phases
906 (modify-phases %standard-phases
907 (add-before 'build 'patch-pass-path
908 (lambda* (#:key inputs #:allow-other-keys)
909 (let* ((password-store (assoc-ref inputs "password-store"))
910 (pass (string-append password-store "/bin/pass")))
54bcc27f
EF
911 (substitute* '("passgithelper.py"
912 "test_passgithelper.py")
a1714ff5 913 (("'pass'") (string-append "'" pass "'")))
b70f9ad1 914 #t)))
54bcc27f 915 (replace 'check
b70f9ad1
EF
916 (lambda _
917 (setenv "HOME" (getcwd))
54bcc27f 918 (invoke "pytest"))))))
a1714ff5
JL
919 (inputs
920 `(("python-pyxdg" ,python-pyxdg)
921 ("password-store" ,password-store)))
b70f9ad1
EF
922 (native-inputs
923 `(("python-pytest" ,python-pytest)
924 ("python-pytest-mock" ,python-pytest-mock)))
a1714ff5
JL
925 (home-page "https://github.com/languitar/pass-git-helper")
926 (synopsis "Git credential helper interfacing with pass")
7133049f
VC
927 (description "pass-git-helper is a git credential helper which
928uses pass, the standard unix password manager, as the credential backend for
a1714ff5
JL
929your git repositories. This is achieved by explicitly defining mappings
930between hosts and entries in the password store.")
931 (license license:lgpl3+)))
eb28a777
EB
932
933(define-public john-the-ripper-jumbo
e57c7dd7 934 (let ((official-version "1.9.0")
eb28a777
EB
935 (jumbo-version "1"))
936 (package
937 (name "john-the-ripper-jumbo")
938 (version (string-append official-version "-" jumbo-version))
939 (source
940 (origin
941 (method url-fetch)
942 (uri (string-append "http://www.openwall.com/john/j/john-"
943 official-version "-jumbo-" jumbo-version ".tar.xz"))
944 (sha256
945 (base32
e57c7dd7 946 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))))
eb28a777 947 (build-system gnu-build-system)
e57c7dd7
EB
948 (native-inputs
949 `(("perl" ,perl)))
eb28a777
EB
950 (inputs
951 `(("gmp" ,gmp)
eb28a777
EB
952 ("libpcap" ,libpcap)
953 ("nss" ,nss)
9de990ba 954 ("openssl" ,openssl)
e57c7dd7
EB
955 ("python" ,python-2) ; For "python" and "python2" shebangs
956 ("ruby" ,ruby) ; For genincstats.rb
eb28a777
EB
957 ("zlib" ,zlib)))
958 (arguments
959 `(#:configure-flags
e57c7dd7
EB
960 (list "--with-systemwide"
961 ;; Do not test for instruction set in configure, and do not
962 ;; pass '-march=native' to gcc:
eb28a777 963 "--disable-native-tests"
e57c7dd7
EB
964 "--disable-native-march"
965 ,(string-append
966 "--enable-simd="
967 (let ((system (or (%current-target-system)
968 (%current-system))))
969 (cond
970 ((or (string-prefix? "x86_64" system)
971 (string-prefix? "i686" system)) "sse2")
972 ((string-prefix? "aarch" system) "neon")
973 (else "no")))))
eb28a777
EB
974 #:phases
975 (modify-phases %standard-phases
976 (add-before 'configure 'chdir-src
e57c7dd7 977 (lambda _ (chdir "src") #t))
eb28a777
EB
978 (replace 'install
979 (lambda _
980 (let ((bindir (string-append %output "/bin"))
981 (docdir (string-append %output "/share/doc/john"))
982 (execdir (string-append %output "/libexec/john"))
e57c7dd7 983 (datadir (string-append %output "/share/john"))
eb28a777
EB
984 (install-file-to (lambda (dir)
985 (lambda (f) (install-file f dir))))
986 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
987 (with-directory-excursion "../run"
e57c7dd7
EB
988 (for-each (install-file-to bindir)
989 (cons*
990 "john" "makechr" "cprepair" "SIPdump" "tgtsnarf"
991 "genmkvpwd" "mkvcalcproba" "calc_stat" "raw2dyna"
992 (find-files "." "(to|2)?john(-[^.]*)?$")))
993 (for-each (lambda (f) ; Install symlinked aliases
994 (let ((tgt (string-append bindir "/" (basename f))))
995 ;; The use of install-file above dereferences
996 ;; symlinks. We'd rather have the symlinks
997 ;; for clarity, so remove tgt before linking.
998 (when (file-exists? tgt) (delete-file tgt))
999 (symlink "john" tgt)))
1000 (find-files "." symlink?))
eb28a777 1001 (for-each (install-file-to execdir)
e57c7dd7
EB
1002 (cons* "mailer" "benchmark-unify" "relbench"
1003 (find-files "." ".*\\.js")))
1004 (for-each (lambda (f)
1005 (let* ((base (basename f))
1006 (name (substring base 0 (string-index base #\.)))
1007 (link (string-append bindir "/" name)))
1008 (install-file f execdir)
1009 (when (and (executable-file? f)
1010 (not (file-exists? link)))
1011 (symlink (string-append execdir "/" base) link))))
1012 (find-files "." ".*\\.(pl|py|rb|lua)"))
1013 (for-each (install-file-to datadir)
eb28a777
EB
1014 (append (find-files "." "(stats|dictionary.*)")
1015 (find-files "." "(.*\\.chr|.*\\.lst)")
1016 (find-files "." ".*\\.conf")))
e57c7dd7 1017 (copy-recursively "rules" (string-append datadir "/rules")))
eb28a777 1018 (copy-recursively "../doc" docdir)
4090dcb2
EB
1019 #t)))
1020 (delete 'check) ; Tests need installed .conf files; move after install
1021 (add-after 'install 'check
1022 (lambda args
1023 (setenv "HOME" "/tmp") ; Some tests need to write to ~/.john
1024 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
1025 (apply (assoc-ref %standard-phases 'check) args))))))
eb28a777
EB
1026 (home-page "http://www.openwall.com/john/")
1027 (synopsis "Password cracker")
1028 (description "John the Ripper is a fast password cracker. Its primary
1029purpose is to detect weak Unix passwords. Besides several @code{crypt}
1030password hash types most commonly found on various Unix systems, supported out
1031of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
1032is the community-enhanced, \"jumbo\" version of John the Ripper.")
1033 (license license:gpl2+))))
649eb8b5
KH
1034
1035(define-public sala
1036 (package
1037 (name "sala")
1038 (version "1.3")
1039 (source
1040 (origin
1041 (method url-fetch)
1042 (uri (pypi-uri "sala" version))
1043 (sha256
1044 (base32
1045 "13qgmc3i2a0cqp8jqrfl93lnphfagb32pgfikc1gza2a14asxzi8"))))
1046 (build-system python-build-system)
1047 (arguments
1048 ;; Sala is supposed to work with Python 3.2 or higher,
1049 ;; but it doesn't work with Python 3.6. Better stick
1050 ;; to Python 2, which works fine.
1051 `(#:python ,python-2))
1052 (propagated-inputs
1053 `(("gnupg" ,gnupg)
1054 ("pwgen" ,pwgen)))
1055 (home-page "http://www.digip.org/sala/")
1056 (synopsis "Encrypted plaintext password store")
1057 (description
1058 "Store passwords and other bits of sensitive plain-text information
1059to encrypted files on a directory hierarchy. The information is protected
1060by GnuPG's symmetrical encryption.")
1061 (license license:expat)))
d4e0ebd0
T
1062
1063(define-public fpm2
1064 (package
1065 (name "fpm2")
1066 (version "0.79")
1067 (source (origin
1068 (method url-fetch)
1069 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
1070 version ".tar.bz2"))
1071 (sha256
1072 (base32
1073 "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
1074 (build-system gnu-build-system)
1075 (inputs `(("gtk2" ,gtk+-2)
1076 ("gnupg" ,gnupg)
1077 ("libxml2" ,libxml2)))
1078 (native-inputs `(("pkg-config" ,pkg-config)
1079 ("intltool" ,intltool)))
1080 (arguments
1081 `(#:phases
1082 (modify-phases %standard-phases
1083 (add-before 'configure 'pre-configure
1084 ;; The file po/POTFILES.in ends up missing for some reason in
1085 ;; both nix and guix builds. Adding the file with contents
1086 ;; found during troubleshooting.
1087 (lambda _
1088 (call-with-output-file "po/POTFILES.in"
1089 (lambda (port)
1090 (format port "data/fpm2.desktop.in
1091data/fpm2.desktop.in.in
1092fpm2.glade
1093src/callbacks.c
1094src/fpm.c
1095src/fpm_file.c
1096src/interface.c
1097src/support.c
1098fpm2.glade
1099")))
1100 #t)))))
1101 (synopsis "Manage, generate and store passwords encrypted")
1102 (description "FPM2 is GTK2 port from Figaro's Password Manager
1103originally developed by John Conneely, with some new enhancements.
1104
1105Upstream development seems to have stopped. It is therefore recommended
1106to use a different password manager.")
1107 (home-page "https://als.regnet.cz/fpm2/")
1108 (license license:gpl2+)))
20b51b17
AI
1109
1110(define-public pass-rotate
1111 (package
1112 (name "pass-rotate")
1113 (version "0.1")
1114 (source
e1a94fe0
EF
1115 (origin
1116 (method git-fetch)
1117 (uri (git-reference
659204ff 1118 (url "https://github.com/ddevault/pass-rotate")
e1a94fe0
EF
1119 (commit version)))
1120 (file-name (git-file-name name version))
1121 (sha256
1122 (base32
1123 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
20b51b17
AI
1124 (build-system python-build-system)
1125 (inputs
1126 `(("python-beautifulsoup4" ,python-beautifulsoup4)
1127 ("python-docopt" ,python-docopt)
1128 ("python-html5lib" ,python-html5lib)
1129 ("python-requests" ,python-requests)))
659204ff 1130 (home-page "https://github.com/ddevault/pass-rotate")
20b51b17
AI
1131 (synopsis "Rotate password on online services")
1132 (description "pass-rotate is a command line utility and python library for
1133rotating passwords on various web services. It makes it easier to rotate your
1134passwords, one at a time or in bulk, when security events or routine upkeep of
1135your online accounts makes it necessary.")
1136 (license license:expat)))
c10aa278
PN
1137
1138(define-public hashcat
1139 (package
1140 (name "hashcat")
4af67aa2 1141 (version "6.1.1")
c10aa278
PN
1142 (source
1143 (origin
1144 (method url-fetch)
1145 (uri (string-append "https://hashcat.net/files/hashcat-"
1146 version ".tar.gz"))
1147 (sha256
1148 (base32
4af67aa2 1149 "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r"))))
c10aa278
PN
1150 (native-inputs
1151 `(("opencl-headers" ,opencl-headers)))
1152 (build-system gnu-build-system)
1153 (arguments
1154 '(#:tests? #f ;no tests
1155 #:make-flags (list (string-append "PREFIX=" %output))
1156 #:phases
1157 (modify-phases %standard-phases
1158 (delete 'configure))))
1159 (home-page "https://hashcat.net/hashcat/")
1160 (synopsis "Advanced password recovery utility")
1161 (description "Hashcat is an password recovery utility, supporting five
1162unique modes of attack for over 200 highly-optimized hashing algorithms.
1163Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
1164Linux, Windows, and macOS, and has facilities to help enable distributed
1165password cracking.")
1166 (license license:expat)))
eb4ffe9b
PN
1167
1168(define-public hashcat-utils
1169 (package
1170 (name "hashcat-utils")
2b9b4b1f 1171 (version "1.9")
eb4ffe9b
PN
1172 (source
1173 (origin
1174 (method url-fetch)
2b9b4b1f
TGR
1175 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
1176 "download/v" version "/"
1177 "hashcat-utils-" version ".7z"))
eb4ffe9b 1178 (sha256
2b9b4b1f 1179 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
eb4ffe9b
PN
1180 (native-inputs
1181 `(("p7zip" ,p7zip)))
1182 (inputs
1183 `(("perl" ,perl)))
1184 (build-system gnu-build-system)
1185 (arguments
1186 `(#:tests? #f ;no tests
1187 #:make-flags (list "CC=gcc"
1188 ;; Upstream bug(?): "make all" seems to remove the
1189 ;; Perl scripts from the source.
1190 "native")
1191 #:phases
1192 (modify-phases %standard-phases
1193 (replace 'unpack
1194 (lambda* (#:key source #:allow-other-keys)
1195 (invoke "7z" "x" source)
1196 (chdir (string-append "hashcat-utils-" ,version "/src"))
1197 #t))
1198 (delete 'configure)
1199 (replace 'install
1200 (lambda* (#:key outputs #:allow-other-keys)
1201 (let ((out (string-append (assoc-ref outputs "out") "/bin")))
1202 (mkdir-p out)
2b9b4b1f
TGR
1203 (for-each
1204 (lambda (file)
1205 (copy-file file (string-append out "/"
1206 (basename file ".bin"))))
1207 (find-files "." "\\.bin$"))
1208 (for-each
1209 (lambda (file)
1210 (copy-file file (string-append out "/"
1211 (basename file ".pl"))))
1212 (find-files "../bin" "\\.pl$"))
eb4ffe9b
PN
1213 #t))))))
1214 (home-page "https://github.com/hashcat/hashcat-utils/")
1215 (synopsis "Small utilities that are useful in advanced password cracking")
1216 (description "Hashcat-utils are a set of small utilities that are useful
1217in advanced password cracking. They all are packed into multiple stand-alone
1218binaries. All of these utils are designed to execute only one specific
1219function. Since they all work with @code{STDIN} and @code{STDOUT} you can
1220group them into chains.")
1221 (license license:expat)))
d823fd96
GLV
1222
1223(define-public bruteforce-luks
1224 (package
1225 (name "bruteforce-luks")
1226 (version "1.4.0")
1227 (source
1228 (origin
1229 (method url-fetch)
1230 (uri (string-append "https://github.com/glv2/bruteforce-luks/releases/download/"
1231 version
1232 "/bruteforce-luks-"
1233 version
1234 ".tar.lz"))
1235 (sha256
1236 (base32 "0yawrlbbklhmvwr99wm7li3r0d5kxvpkwf33a12rji7z0ya5p340"))))
1237 (build-system gnu-build-system)
1238 (native-inputs
1239 `(("lzip" ,lzip)))
1240 (inputs
1241 `(("cryptsetup" ,cryptsetup)))
1242 (synopsis "LUKS encrypted volume cracker")
1243 (description
1244 "This is a cracker for LUKS encrypted volumes. It can be used either in
1245exhaustive mode to try every password given a charset or in dictionary mode to
1246try every password contained in a file.")
1247 (home-page "https://github.com/glv2/bruteforce-luks")
1248 (license license:gpl3+)))
b2b9b227
JBN
1249
1250(define-public makepasswd
1251 (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
1252 (revision "1"))
1253 (package
1254 (name "makepasswd")
1255 (version (git-version "0.5.4" revision commit))
1256 (source
1257 (origin
1258 (method git-fetch)
1259 (uri (git-reference
1260 (url "https://github.com/khorben/makepasswd")
1261 (commit commit)))
1262 (file-name (git-file-name name version))
1263 (sha256
1264 (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
1265 (build-system gnu-build-system)
1266 (native-inputs
1267 `(("pkg-config" ,pkg-config)
1268 ("libxslt" ,libxslt)
1269 ("libxml2" ,libxml2)
1270 ("docbook-xsl" ,docbook-xsl)
1271 ("docbook-xml" ,docbook-xml)))
1272 (inputs
1273 `(("openssl" ,openssl)))
1274 (arguments
1275 `(#:phases
1276 (modify-phases %standard-phases
1277 (delete 'configure))
1278 #:make-flags (list "CC=gcc"
1279 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1280 #:tests? #f)) ;no tests
1281 (synopsis "Generate (pseudo-)random passwords and hashes")
1282 (description
1283 "Makepasswd is a program that generates pseudo-random passwords of a
1284desired length. It can also generate their corresponding hashes for a given
1285encryption algorithm if so desired.")
1286 (home-page "https://github.com/khorben/makepasswd")
1287 (license license:gpl3))))
36a1925f
BW
1288
1289(define-public pass-tomb
1290 (package
1291 (name "pass-tomb")
1292 (version "1.2")
1293 (source
1294 (origin
1295 (method git-fetch)
1296 (uri (git-reference
1297 (url "https://github.com/roddhjav/pass-tomb")
1298 (commit (string-append "v" version))))
1299 (file-name (git-file-name name version))
1300 (sha256
1301 (base32 "1qj7vx7svk1ljwihj3kv310k17mafnf919n30n4qn1yxmmsvj924"))))
1302 (build-system gnu-build-system)
1303 (arguments
1304 `(#:make-flags
1305 (let ((out (assoc-ref %outputs "out")))
1306 (list (string-append "PREFIX=" out)
1307 (string-append "BASHCOMPDIR=" out "/etc/bash_completion.d")))
1308 #:test-target "tests"
1309 ;; tests are very dependent on system state (swap partition) and require
1310 ;; access to /tmp/zsh which is not in the build container.
1311 #:tests? #f
1312 #:phases
1313 (modify-phases %standard-phases
1314 (add-after 'unpack 'set-tomb-path
1315 (lambda* (#:key inputs #:allow-other-keys)
1316 (let ((tomb (assoc-ref inputs "tomb")))
1317 (substitute* "tomb.bash"
1318 ((":-tomb")
1319 (string-append ":-" tomb "/bin/tomb"))))))
1320 (delete 'configure))))
1321 (inputs
1322 `(("tomb" ,tomb)))
1323 (home-page "https://github.com/roddhjav/pass-tomb")
1324 (synopsis "Pass extension keeping the tree of passwords encrypted")
1325 (description "Pass-tomb provides a convenient solution to put your
1326password store in a Tomb and then keep your password tree encrypted when you
1327are not using it. It uses the same GPG key to encrypt passwords and tomb,
1328therefore you don't need to manage more key or secret. Moreover, you can ask
1329pass-tomb to automatically close your store after a given time.")
1330 (license license:gpl3+)))