gnu: emacs-oauth2: Fix source location.
[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>
de63b20e
SS
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:)
e8647227 50 #:use-module (guix build-system cmake)
de63b20e 51 #:use-module (guix build-system gnu)
63299f28 52 #:use-module (guix build-system go)
f59ea3a7 53 #:use-module (guix build-system trivial)
de63b20e 54 #:use-module (guix download)
7d4b3e1e 55 #:use-module (guix git-download)
e8647227 56 #:use-module (guix packages)
53dcbbec 57 #:use-module (gnu packages)
c285a400 58 #:use-module (gnu packages admin)
81635fb6 59 #:use-module (gnu packages aidc)
54b41d2d 60 #:use-module (gnu packages authentication)
c285a400 61 #:use-module (gnu packages base)
ac257f12 62 #:use-module (gnu packages check)
e8647227 63 #:use-module (gnu packages compression)
da1b30bd 64 #:use-module (gnu packages crypto)
d823fd96 65 #:use-module (gnu packages cryptsetup)
da1b30bd 66 #:use-module (gnu packages curl)
b2b9b227 67 #:use-module (gnu packages docbook)
7d4b3e1e 68 #:use-module (gnu packages file)
a1714ff5 69 #:use-module (gnu packages freedesktop)
7d4b3e1e 70 #:use-module (gnu packages gettext)
f339f277 71 #:use-module (gnu packages glib)
e8647227 72 #:use-module (gnu packages gnupg)
63299f28 73 #:use-module (gnu packages golang)
0050876b 74 #:use-module (gnu packages gtk)
dd24e906 75 #:use-module (gnu packages guile)
eb28a777 76 #:use-module (gnu packages kerberos)
0751fddd 77 #:use-module (gnu packages libffi)
c285a400 78 #:use-module (gnu packages linux)
3d4f9d5c 79 #:use-module (gnu packages man)
eb28a777 80 #:use-module (gnu packages multiprecision)
7e9b07bd 81 #:use-module (gnu packages ncurses)
aff0cce9 82 #:use-module (gnu packages nss)
c10aa278 83 #:use-module (gnu packages opencl)
eb4ffe9b 84 #:use-module (gnu packages perl)
7e9b07bd 85 #:use-module (gnu packages pkg-config)
3d4f9d5c 86 #:use-module (gnu packages python)
20b51b17 87 #:use-module (gnu packages python-web)
44d10b1f 88 #:use-module (gnu packages python-xyz)
24adcbab 89 #:use-module (gnu packages readline)
e57c7dd7 90 #:use-module (gnu packages ruby)
24adcbab 91 #:use-module (gnu packages security-token)
177475cf 92 #:use-module (gnu packages suckless)
54b41d2d 93 #:use-module (gnu packages tcl)
7e9b07bd 94 #:use-module (gnu packages tls)
e8647227 95 #:use-module (gnu packages qt)
c285a400 96 #:use-module (gnu packages version-control)
7d4b3e1e 97 #:use-module (gnu packages wxwidgets)
dd24e906 98 #:use-module (gnu packages xdisorg)
3d4f9d5c 99 #:use-module (gnu packages xorg)
d4e0ebd0 100 #:use-module (gnu packages xml)
3d4f9d5c 101 #:use-module (guix build-system python))
de63b20e
SS
102
103(define-public pwgen
104 (package
105 (name "pwgen")
5a2c4b3b 106 (version "2.08")
de63b20e
SS
107 (source
108 (origin
109 (method url-fetch)
de67e922
LF
110 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
111 "/pwgen-" version ".tar.gz"))
de63b20e 112 (sha256
5a2c4b3b 113 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
de63b20e
SS
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
120human.")
121 (license license:gpl2)))
e8647227 122
99672f7b
EF
123(define-public keepassxc
124 (package
125 (name "keepassxc")
aae32847 126 (version "2.6.4")
99672f7b
EF
127 (source
128 (origin
129 (method url-fetch)
e2d14ee9 130 (uri (string-append "https://github.com/keepassxreboot/keepassxc"
99672f7b
EF
131 "/releases/download/" version "/keepassxc-"
132 version "-src.tar.xz"))
133 (sha256
aae32847 134 (base32 "0azq20rqsx7axrigha4qh81ipvhqnnlb27w3xdjg5z4h3jky4dp5"))))
99672f7b 135 (build-system cmake-build-system)
da1b30bd 136 (arguments
24adcbab 137 '(#:configure-flags '("-DWITH_XC_ALL=YES"
074814fe
JL
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)))))
d1279853
NG
151 (native-inputs
152 `(("asciidoctor" ,ruby-asciidoctor)
153 ("qttools" ,qttools)))
99672f7b 154 (inputs
3374dcc7
EF
155 `(("argon2" ,argon2)
156 ("libgcrypt" ,libgcrypt)
0e5d66ab 157 ("libsodium" ,libsodium) ; XC_BROWSER
24adcbab 158 ("libyubikey" ,libyubikey) ; XC_YUBIKEY
99672f7b
EF
159 ("libxi" ,libxi)
160 ("libxtst" ,libxtst)
0f3794fb 161 ("qrencode" ,qrencode)
99672f7b 162 ("qtbase" ,qtbase)
0f3794fb 163 ("qtsvg" ,qtsvg)
99672f7b 164 ("qtx11extras" ,qtx11extras)
24adcbab
EF
165 ("quazip" ,quazip) ; XC_KEESHARE
166 ("readline" ,readline)
167 ("yubikey-personalization" ,yubikey-personalization) ; XC_YUBIKEY
99672f7b 168 ("zlib" ,zlib)))
99672f7b
EF
169 (home-page "https://www.keepassxc.org")
170 (synopsis "Password manager")
171 (description "KeePassXC is a password manager or safe which helps you to
172manage your passwords in a secure way. You can put all your passwords in one
173database, which is locked with one master key or a key-file which can be stored
174on an external storage device. The databases are encrypted using the
175algorithms AES or Twofish.")
24adcbab
EF
176 ;; While various parts of the software are licensed under different licenses,
177 ;; the combined work falls under the GPLv3.
99672f7b
EF
178 (license license:gpl3)))
179
e8647227
EF
180(define-public keepassx
181 (package
182 (name "keepassx")
a00fbe8a 183 (version "2.0.3")
e8647227
EF
184 (source
185 (origin
186 (method url-fetch)
e5be0e01
EF
187 (uri (string-append "https://www.keepassx.org/releases/" version
188 "/keepassx-" version ".tar.gz"))
e8647227 189 (sha256
2c5e4976 190 (base32
a00fbe8a 191 "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
e8647227
EF
192 (build-system cmake-build-system)
193 (inputs
194 `(("libgcrypt" ,libgcrypt)
a00fbe8a 195 ("libxi" ,libxi)
e8647227
EF
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
203manage your passwords in a secure way. You can put all your passwords in one
204database, which is locked with one master key or a key-file which can be stored
205on an external storage device. The databases are encrypted using the
206algorithms AES or Twofish.")
207 ;; Non functional parts use various licences.
b7ac10e6
EF
208 (license license:gpl3)
209 (properties `((superseded . ,keepassxc)))))
dd24e906 210
7d4b3e1e
TG
211(define-public pwsafe
212 (package
213 (name "pwsafe")
2dfacc1d 214 (version "3.54.1")
747aa6c4 215 (home-page "https://www.pwsafe.org/")
7d4b3e1e
TG
216 (source
217 (origin
218 (method git-fetch)
219 (uri (git-reference
b0e7b699 220 (url "https://github.com/pwsafe/pwsafe")
7d4b3e1e 221 (commit version)))
747aa6c4 222 (sha256
2dfacc1d 223 (base32 "0d51dlw98mv23nwb0b5jyji8gnb9f5cnig6kivfljl97lmr6lhvf"))
747aa6c4 224 (file-name (git-file-name name version))))
7d4b3e1e 225 (build-system cmake-build-system)
50bfb70b
EF
226 (native-inputs
227 `(("gettext" ,gettext-minimal)
228 ("gtest" ,googletest)
229 ("perl" ,perl)
230 ("zip" ,zip)))
7d4b3e1e
TG
231 (inputs `(("curl" ,curl)
232 ("file" ,file)
bb93042c 233 ("libuuid" ,util-linux "lib")
7d4b3e1e
TG
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)
248add_subdirectory(src/test)\n" cmake-port)
249 (close cmake-port)
9b572aba 250 #t))))))
7d4b3e1e
TG
251 (synopsis "Password safe with automatic input and key generation")
252 (description "pwsafe is a password manager originally designed by Bruce
253Schneier. It offers a simple UI to manage passwords for different services.
254There are other programs that support the file format on different
255platforms.")
256 (license license:artistic2.0)))
257
dd24e906
DT
258(define-public shroud
259 (package
260 (name "shroud")
7dff3225 261 (version "0.1.2")
dd24e906
DT
262 (source (origin
263 (method url-fetch)
a652eb93 264 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
dd24e906
DT
265 version ".tar.gz"))
266 (sha256
267 (base32
7dff3225 268 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
dd24e906 269 (build-system gnu-build-system)
7dff3225
AS
270 (native-inputs
271 `(("pkg-config" ,pkg-config)))
df0e8a23 272 (arguments
7dff3225
AS
273 `(#:modules ((guix build gnu-build-system)
274 (guix build utils)
275 (ice-9 popen)
276 (ice-9 rdelim))
277 #:phases
df0e8a23
SB
278 (modify-phases %standard-phases
279 (add-after 'install 'wrap-shroud
7dff3225 280 (lambda* (#:key inputs outputs #:allow-other-keys)
df0e8a23 281 (let* ((out (assoc-ref outputs "out"))
7dff3225
AS
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"))
df0e8a23
SB
289 (prog (string-append out "/bin/shroud")))
290 (wrap-program prog
291 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
292 #t))))))
dd24e906 293 (inputs
7dff3225 294 `(("guile" ,guile-2.2)
dd24e906
DT
295 ("gnupg" ,gnupg)
296 ("xclip" ,xclip)))
297 (synopsis "GnuPG-based secret manager")
298 (description "Shroud is a simple secret manager with a command line
299interface. The password database is stored as a Scheme s-expression and
300encrypted with a GnuPG key. Secrets consist of an arbitrary number of
301key/value pairs, making Shroud suitable for more than just password storage.
302For copying and pasting secrets into web browsers and other graphical
303applications, there is xclip integration." )
59d915ac 304 (home-page "https://dthompson.us/projects/shroud.html")
dd24e906 305 (license license:gpl3+)))
7e9b07bd
AP
306
307(define-public yapet
308 (package
309 (name "yapet")
1385ac55 310 (version "2.5")
988f53e1
TGR
311 (source
312 (origin
313 (method url-fetch)
314 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
315 version ".tar.xz"))
316 (sha256
1385ac55 317 (base32 "0hpibsdry259cmvps35isr6jn9cd9fsk3r1h0ppjx9zxfrpqwldg"))))
7e9b07bd 318 (build-system gnu-build-system)
5fb085da
TGR
319 (arguments
320 `(#:configure-flags
321 (list (string-append "--docdir=" (assoc-ref %outputs "out")
322 "/share/doc",name "-" ,version))))
7e9b07bd 323 (inputs
988f53e1
TGR
324 `(("argon2" ,argon2)
325 ("ncurses" ,ncurses)
7e9b07bd
AP
326 ("openssl" ,openssl)))
327 (native-inputs
988f53e1
TGR
328 `(("cppunit" ,cppunit)
329 ("pkg-config" ,pkg-config)))
7e9b07bd
AP
330 (synopsis "Yet Another Password Encryption Tool")
331 (description "YAPET is a text based password manager using the Blowfish
332encryption algorithm. Because of its small footprint and very few library
333dependencies, it is suited for installing on desktop and server systems alike.
334The text based user interface allows you to run YAPET easily in a Secure Shell
335session. Two companion utilities enable users to convert CSV files to YAPET
336and vice versa.")
3fc0b54e 337 (home-page "https://yapet.guengel.ch/")
7e9b07bd 338 (license license:gpl3+)))
72029c8b
SB
339
340(define-public cracklib
341 (package
342 (name "cracklib")
9081333b
TGR
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"))))
72029c8b 352 (build-system gnu-build-system)
27faad22
FP
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))))))
72029c8b
SB
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
b1a686bb
TGR
366@command{passwd}-like program. The idea is simple: try to prevent users from
367choosing passwords that could easily be guessed (or \"cracked\") by filtering
368them out, at the source.")
72029c8b 369 (license license:lgpl2.1)))
c2fb2076
SB
370
371(define-public libpwquality
372 (package
373 (name "libpwquality")
485ee063 374 (version "1.4.4")
c2fb2076
SB
375 (source (origin
376 (method url-fetch)
377 (uri (list
2f6a158b
TGR
378 (string-append "https://github.com/libpwquality/libpwquality"
379 "/releases/download/libpwquality-" version
380 "/libpwquality-" version ".tar.bz2")
c2fb2076
SB
381 (string-append "https://launchpad.net/libpwquality/trunk/"
382 version "/+download/"
2f6a158b 383 "libpwquality-" version ".tar.bz2")))
c2fb2076
SB
384 (sha256
385 (base32
485ee063 386 "0id5a8bi8xnjg11g9vzrl2xbpx65mfxclxcvis7zx1v8vhisyfyl"))))
c2fb2076
SB
387 (build-system gnu-build-system)
388 (arguments
9cd61289
VM
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)))
c2fb2076
SB
400 (inputs
401 `(("cracklib" ,cracklib)))
402 (synopsis "Password quality checker")
c18594dd 403 (home-page "https://github.com/libpwquality/libpwquality")
c2fb2076
SB
404 (description
405 "Libpwquality is a library for password quality checking and generation of
406random passwords that pass the checks.")
407 (license license:gpl2+)))
3d4f9d5c
CAW
408
409(define-public assword
410 (package
411 (name "assword")
d504de26 412 (version "0.11")
3d4f9d5c
CAW
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
d504de26 421 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
3d4f9d5c 422 (arguments
f339f277 423 `(;; irritatingly, tests do run but not there are two problems:
3d4f9d5c
CAW
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
0050876b
SB
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)))
3d4f9d5c
CAW
443 (add-after 'install 'manpage
444 (lambda* (#:key outputs #:allow-other-keys)
3692cffe
RW
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")))))))
3d4f9d5c
CAW
453 (build-system python-build-system)
454 (native-inputs
f339f277 455 `(("txt2man" ,txt2man)))
3d4f9d5c 456 (inputs
0050876b
SB
457 `(("gtk+" ,gtk+)
458 ("python-xdo" ,python-xdo)
f339f277
LF
459 ("python-gpg" ,python-gpg)
460 ("python-pygobject" ,python-pygobject)))
3d4f9d5c
CAW
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
466JSON files. It has a command line interface as well as a very simple
467graphical interface, which can even \"type\" your passwords into
468any X11 window.")
469 (license license:gpl3+)))
c285a400
JT
470
471(define-public password-store
472 (package
473 (name "password-store")
3e9aa5cf 474 (version "1.7.3")
c285a400
JT
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
3e9aa5cf 482 "1x53k5dn3cdmvy8m4fqdld4hji5n676ksl0ql4armkmsds26av1b"))))
c285a400
JT
483 (build-system gnu-build-system)
484 (arguments
485 '(#:phases
486 (modify-phases %standard-phases
487 (delete 'configure)
619f98fa 488 (delete 'build)
55541556
AG
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))
177475cf
JL
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)
e9ce6425
TGR
512 (let* ((out (assoc-ref outputs "out"))
513 (bin (string-append out "/bin")))
514 (install-file "contrib/dmenu/passmenu" bin)
177475cf 515 #t)))
61201e46
AG
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"))
81635fb6 521 '("coreutils" "getopt" "git" "gnupg" "qrencode"
61201e46
AG
522 "sed" "tree" "which" "xclip"))))
523 (wrap-program (string-append out "/bin/pass")
718c1278 524 `("PATH" ":" prefix (,(string-join path ":"))))
718c1278 525 #t))))
df931ac3
BW
526 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
527 "WITH_ALLCOMP=yes"
528 (string-append "BASHCOMPDIR="
529 %output "/etc/bash_completion.d"))
a77f0360
CB
530 ;; Parallel tests may cause a race condition leading to a
531 ;; timeout in some circumstances.
532 #:parallel-tests? #f
c285a400 533 #:test-target "test"))
55541556
AG
534 (native-search-paths
535 (list (search-path-specification
536 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
869a4c0f 537 (separator #f) ;single entry
55541556 538 (files '("lib/password-store/extensions")))))
61201e46 539 (inputs
177475cf
JL
540 `(("dmenu" ,dmenu)
541 ("getopt" ,util-linux)
61201e46
AG
542 ("git" ,git)
543 ("gnupg" ,gnupg)
81635fb6 544 ("qrencode" ,qrencode)
61201e46
AG
545 ("sed" ,sed)
546 ("tree" ,tree)
547 ("which" ,which)
177475cf
JL
548 ("xclip" ,xclip)
549 ("xdotool" ,xdotool)))
62ab60aa 550 (home-page "https://www.passwordstore.org/")
c285a400
JT
551 (synopsis "Encrypted password manager")
552 (description "Password-store is a password manager which uses GnuPG to
553store and retrieve passwords. The tool stores each password in its own
554GnuPG-encrypted file, allowing the program to be simple yet secure.
555Synchronization is possible using the integrated git support, which commits
556changes to your password database to a git repository that can be managed
557through the pass command.")
558 (license license:gpl2+)))
6d32dd8c 559
54b41d2d
AG
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
605one-time-password (OTP) secrets, generating OTP codes, and displaying secret
606key URIs using the standard otpauth:// scheme.")
607 (license license:gpl3+)))
608
872da48e
JM
609(define-public qtpass
610 (package
611 (name "qtpass")
e1e9baf2 612 (version "1.3.2")
872da48e
JM
613 (source
614 (origin
615 (method git-fetch)
616 (uri (git-reference
b0e7b699 617 (url "https://github.com/IJHack/QtPass")
872da48e
JM
618 (commit (string-append "v" version))))
619 (file-name (git-file-name name version))
620 (sha256
621 (base32
e1e9baf2 622 "0748hjvhjrybi33ci3c8hcr74k9pdrf5jv8npf9hrsrmdyy1kr9x"))))
872da48e
JM
623 (build-system gnu-build-system)
624 (arguments
73d9caba
EF
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
872da48e
JM
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)))
73d9caba
EF
666 (add-after 'install 'wrap-qt
667 (lambda* (#:key outputs #:allow-other-keys)
668 (wrap-qt-program (assoc-ref outputs "out") "qtpass")
669 #t))
872da48e
JM
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
684password-store also known as pass. Can use either pass or gpg to interact
685with password-store files. Features configurable password generation,
686templates, clipboard handling, and per folder settings for multi-recipient
687encryption.")
688 (license license:gpl3+)))
689
f59ea3a7
TLC
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
722using 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
63299f28
AG
733(define-public browserpass-native
734 (package
735 (name "browserpass-native")
291afa0f 736 (version "3.0.7")
63299f28
AG
737 (source
738 (origin
739 (method git-fetch)
740 (uri (git-reference
b0e7b699 741 (url "https://github.com/browserpass/browserpass-native")
63299f28
AG
742 (commit version)))
743 (file-name (git-file-name name version))
744 (sha256
745 (base32
291afa0f 746 "1jkjslbbac49xjyjkc2b07phdm3i64z40kh6h55cl22dxjmpp1nb"))))
63299f28
AG
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
800UNIX-based password store manager. It allows you to auto-fill or copy to
801clipboard credentials for the current domain, protecting you from phishing
802attacks.
803
804This package only contains the Browserpass native messaging host. You must
805also install the browser extension for GNU IceCat or ungoogled-chromium
806separately.")
807 (license license:isc)))
808
6d32dd8c
LG
809(define-public argon2
810 (package
811 (name "argon2")
fe109349 812 (version "20190702")
6d32dd8c
LG
813 (source
814 (origin
c600cf2a
EF
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))
6d32dd8c
LG
820 (sha256
821 (base32
fe109349 822 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
6d32dd8c
LG
823 (build-system gnu-build-system)
824 (arguments
825 `(#:test-target "test"
fe109349
EF
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
6d32dd8c
LG
831 #:phases
832 (modify-phases %standard-phases
fe109349 833 (delete 'configure)))) ; No configure script.
6d32dd8c
LG
834 (home-page "https://www.argon2.com/")
835 (synopsis "Password hashing library")
836 (description "Argon2 provides a key derivation function that was declared
837winner of the 2015 Password Hashing Competition.")
c06bf6a3
MB
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))))
153e58c5 841
a1714ff5
JL
842(define-public pass-git-helper
843 (package
844 (name "pass-git-helper")
b70f9ad1 845 (version "1.1.0")
a1714ff5
JL
846 (source
847 (origin
df58cc9c
EF
848 (method git-fetch)
849 (uri (git-reference
850 (url "https://github.com/languitar/pass-git-helper")
b70f9ad1 851 (commit (string-append "v" version))))
df58cc9c 852 (file-name (git-file-name name version))
a1714ff5
JL
853 (sha256
854 (base32
b70f9ad1 855 "18nvwlp0w4aqj268wly60rnjzqw2d8jl0hbs6bkwp3hpzzz5g6yd"))))
a1714ff5
JL
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")))
54bcc27f
EF
864 (substitute* '("passgithelper.py"
865 "test_passgithelper.py")
a1714ff5 866 (("'pass'") (string-append "'" pass "'")))
b70f9ad1 867 #t)))
54bcc27f 868 (replace 'check
b70f9ad1
EF
869 (lambda _
870 (setenv "HOME" (getcwd))
54bcc27f 871 (invoke "pytest"))))))
a1714ff5
JL
872 (inputs
873 `(("python-pyxdg" ,python-pyxdg)
874 ("password-store" ,password-store)))
b70f9ad1
EF
875 (native-inputs
876 `(("python-pytest" ,python-pytest)
877 ("python-pytest-mock" ,python-pytest-mock)))
a1714ff5
JL
878 (home-page "https://github.com/languitar/pass-git-helper")
879 (synopsis "Git credential helper interfacing with pass")
7133049f
VC
880 (description "pass-git-helper is a git credential helper which
881uses pass, the standard unix password manager, as the credential backend for
a1714ff5
JL
882your git repositories. This is achieved by explicitly defining mappings
883between hosts and entries in the password store.")
884 (license license:lgpl3+)))
eb28a777
EB
885
886(define-public john-the-ripper-jumbo
e57c7dd7 887 (let ((official-version "1.9.0")
eb28a777
EB
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
e57c7dd7 899 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))))
eb28a777 900 (build-system gnu-build-system)
e57c7dd7
EB
901 (native-inputs
902 `(("perl" ,perl)))
eb28a777
EB
903 (inputs
904 `(("gmp" ,gmp)
eb28a777
EB
905 ("libpcap" ,libpcap)
906 ("nss" ,nss)
9de990ba 907 ("openssl" ,openssl)
e57c7dd7
EB
908 ("python" ,python-2) ; For "python" and "python2" shebangs
909 ("ruby" ,ruby) ; For genincstats.rb
eb28a777
EB
910 ("zlib" ,zlib)))
911 (arguments
912 `(#:configure-flags
e57c7dd7
EB
913 (list "--with-systemwide"
914 ;; Do not test for instruction set in configure, and do not
915 ;; pass '-march=native' to gcc:
eb28a777 916 "--disable-native-tests"
e57c7dd7
EB
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")))))
eb28a777
EB
927 #:phases
928 (modify-phases %standard-phases
929 (add-before 'configure 'chdir-src
e57c7dd7 930 (lambda _ (chdir "src") #t))
eb28a777
EB
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"))
e57c7dd7 936 (datadir (string-append %output "/share/john"))
eb28a777
EB
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"
e57c7dd7
EB
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?))
eb28a777 954 (for-each (install-file-to execdir)
e57c7dd7
EB
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)
eb28a777
EB
967 (append (find-files "." "(stats|dictionary.*)")
968 (find-files "." "(.*\\.chr|.*\\.lst)")
969 (find-files "." ".*\\.conf")))
e57c7dd7 970 (copy-recursively "rules" (string-append datadir "/rules")))
eb28a777 971 (copy-recursively "../doc" docdir)
4090dcb2
EB
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))))))
eb28a777
EB
979 (home-page "http://www.openwall.com/john/")
980 (synopsis "Password cracker")
981 (description "John the Ripper is a fast password cracker. Its primary
982purpose is to detect weak Unix passwords. Besides several @code{crypt}
983password hash types most commonly found on various Unix systems, supported out
984of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
985is the community-enhanced, \"jumbo\" version of John the Ripper.")
986 (license license:gpl2+))))
649eb8b5
KH
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
1012to encrypted files on a directory hierarchy. The information is protected
1013by GnuPG's symmetrical encryption.")
1014 (license license:expat)))
d4e0ebd0
T
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
1044data/fpm2.desktop.in.in
1045fpm2.glade
1046src/callbacks.c
1047src/fpm.c
1048src/fpm_file.c
1049src/interface.c
1050src/support.c
1051fpm2.glade
1052")))
1053 #t)))))
1054 (synopsis "Manage, generate and store passwords encrypted")
1055 (description "FPM2 is GTK2 port from Figaro's Password Manager
1056originally developed by John Conneely, with some new enhancements.
1057
1058Upstream development seems to have stopped. It is therefore recommended
1059to use a different password manager.")
1060 (home-page "https://als.regnet.cz/fpm2/")
1061 (license license:gpl2+)))
20b51b17
AI
1062
1063(define-public pass-rotate
1064 (package
1065 (name "pass-rotate")
1066 (version "0.1")
1067 (source
e1a94fe0
EF
1068 (origin
1069 (method git-fetch)
1070 (uri (git-reference
659204ff 1071 (url "https://github.com/ddevault/pass-rotate")
e1a94fe0
EF
1072 (commit version)))
1073 (file-name (git-file-name name version))
1074 (sha256
1075 (base32
1076 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
20b51b17
AI
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)))
659204ff 1083 (home-page "https://github.com/ddevault/pass-rotate")
20b51b17
AI
1084 (synopsis "Rotate password on online services")
1085 (description "pass-rotate is a command line utility and python library for
1086rotating passwords on various web services. It makes it easier to rotate your
1087passwords, one at a time or in bulk, when security events or routine upkeep of
1088your online accounts makes it necessary.")
1089 (license license:expat)))
c10aa278
PN
1090
1091(define-public hashcat
1092 (package
1093 (name "hashcat")
4af67aa2 1094 (version "6.1.1")
c10aa278
PN
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
4af67aa2 1102 "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r"))))
c10aa278
PN
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
1115unique modes of attack for over 200 highly-optimized hashing algorithms.
1116Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
1117Linux, Windows, and macOS, and has facilities to help enable distributed
1118password cracking.")
1119 (license license:expat)))
eb4ffe9b
PN
1120
1121(define-public hashcat-utils
1122 (package
1123 (name "hashcat-utils")
2b9b4b1f 1124 (version "1.9")
eb4ffe9b
PN
1125 (source
1126 (origin
1127 (method url-fetch)
2b9b4b1f
TGR
1128 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
1129 "download/v" version "/"
1130 "hashcat-utils-" version ".7z"))
eb4ffe9b 1131 (sha256
2b9b4b1f 1132 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
eb4ffe9b
PN
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)
2b9b4b1f
TGR
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$"))
eb4ffe9b
PN
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
1170in advanced password cracking. They all are packed into multiple stand-alone
1171binaries. All of these utils are designed to execute only one specific
1172function. Since they all work with @code{STDIN} and @code{STDOUT} you can
1173group them into chains.")
1174 (license license:expat)))
d823fd96
GLV
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
1198exhaustive mode to try every password given a charset or in dictionary mode to
1199try every password contained in a file.")
1200 (home-page "https://github.com/glv2/bruteforce-luks")
1201 (license license:gpl3+)))
b2b9b227
JBN
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
1237desired length. It can also generate their corresponding hashes for a given
1238encryption algorithm if so desired.")
1239 (home-page "https://github.com/khorben/makepasswd")
1240 (license license:gpl3))))
36a1925f
BW
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
1279password store in a Tomb and then keep your password tree encrypted when you
1280are not using it. It uses the same GPG key to encrypt passwords and tomb,
1281therefore you don't need to manage more key or secret. Moreover, you can ask
1282pass-tomb to automatically close your store after a given time.")
1283 (license license:gpl3+)))