gnu: capstone: Update to 3.0.5.
[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>
6f5c67d7 3;;; Copyright © 2015, 2016, 2017, 2018 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>
61201e46 9;;; Copyright © 2016 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>
d504de26 12;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
a1714ff5 13;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
eb28a777 14;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
7f7fadb5 15;;; Copyright © 2017 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>
c10aa278 22;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
037d1851 23;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
de63b20e
SS
24;;;
25;;; This file is part of GNU Guix.
26;;;
27;;; GNU Guix is free software; you can redistribute it and/or modify it
28;;; under the terms of the GNU General Public License as published by
29;;; the Free Software Foundation; either version 3 of the License, or (at
30;;; your option) any later version.
31;;;
32;;; GNU Guix is distributed in the hope that it will be useful, but
33;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35;;; GNU General Public License for more details.
36;;;
37;;; You should have received a copy of the GNU General Public License
38;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39
40(define-module (gnu packages password-utils)
41 #:use-module ((guix licenses) #:prefix license:)
e8647227 42 #:use-module (guix build-system cmake)
de63b20e
SS
43 #:use-module (guix build-system gnu)
44 #:use-module (guix download)
e8647227 45 #:use-module (guix packages)
53dcbbec 46 #:use-module (gnu packages)
c285a400 47 #:use-module (gnu packages admin)
81635fb6 48 #:use-module (gnu packages aidc)
c285a400 49 #:use-module (gnu packages base)
ac257f12 50 #:use-module (gnu packages check)
e8647227 51 #:use-module (gnu packages compression)
da1b30bd
EF
52 #:use-module (gnu packages crypto)
53 #:use-module (gnu packages curl)
a1714ff5 54 #:use-module (gnu packages freedesktop)
f339f277 55 #:use-module (gnu packages glib)
e8647227 56 #:use-module (gnu packages gnupg)
eb28a777 57 #:use-module (gnu packages gnuzilla)
0050876b 58 #:use-module (gnu packages gtk)
dd24e906 59 #:use-module (gnu packages guile)
eb28a777 60 #:use-module (gnu packages kerberos)
0751fddd 61 #:use-module (gnu packages libffi)
c285a400 62 #:use-module (gnu packages linux)
3d4f9d5c 63 #:use-module (gnu packages man)
eb28a777 64 #:use-module (gnu packages multiprecision)
7e9b07bd 65 #:use-module (gnu packages ncurses)
c10aa278 66 #:use-module (gnu packages opencl)
eb4ffe9b 67 #:use-module (gnu packages perl)
7e9b07bd 68 #:use-module (gnu packages pkg-config)
3d4f9d5c 69 #:use-module (gnu packages python)
20b51b17 70 #:use-module (gnu packages python-web)
177475cf 71 #:use-module (gnu packages suckless)
7e9b07bd 72 #:use-module (gnu packages tls)
e8647227 73 #:use-module (gnu packages qt)
c285a400 74 #:use-module (gnu packages version-control)
dd24e906 75 #:use-module (gnu packages xdisorg)
3d4f9d5c 76 #:use-module (gnu packages xorg)
d4e0ebd0 77 #:use-module (gnu packages xml)
3d4f9d5c 78 #:use-module (guix build-system python))
de63b20e
SS
79
80(define-public pwgen
81 (package
82 (name "pwgen")
5a2c4b3b 83 (version "2.08")
de63b20e
SS
84 (source
85 (origin
86 (method url-fetch)
de67e922
LF
87 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
88 "/pwgen-" version ".tar.gz"))
de63b20e 89 (sha256
5a2c4b3b 90 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
de63b20e
SS
91 (build-system gnu-build-system)
92 (arguments
93 `(#:tests? #f)) ; no test suite
94 (home-page "http://pwgen.sourceforge.net/")
95 (synopsis "Password generator")
96 (description "Pwgen generates passwords which can be easily memorized by a
97human.")
98 (license license:gpl2)))
e8647227 99
99672f7b
EF
100(define-public keepassxc
101 (package
102 (name "keepassxc")
d412dbe4 103 (version "2.3.3")
99672f7b
EF
104 (source
105 (origin
106 (method url-fetch)
107 (uri (string-append "https://github.com/keepassxreboot/" name
108 "/releases/download/" version "/keepassxc-"
109 version "-src.tar.xz"))
110 (sha256
111 (base32
d412dbe4 112 "1m8alsp39vk21zgcvy5zswk0dc1xmajbwnccg7n0lndsi7pqbzyg"))))
99672f7b 113 (build-system cmake-build-system)
da1b30bd
EF
114 (arguments
115 '(#:configure-flags '("-DWITH_XC_NETWORKING=YES"
116 "-DWITH_XC_BROWSER=YES"
6f5c67d7
EF
117 "-DWITH_XC_SSHAGENT=YES")
118 #:phases
119 (modify-phases %standard-phases
120 ;; should be fixed in 2.3.3+, see:
121 ;; https://github.com/keepassxreboot/keepassxc/pull/1964
122 (add-after 'unpack 'patch-sources
123 (lambda _
124 (substitute* "src/gui/entry/EditEntryWidget.cpp"
125 (("#include <QColorDialog>") "#include <QColorDialog>
126#include <QButtonGroup>"))
127 #t)))))
99672f7b 128 (inputs
3374dcc7 129 `(("argon2" ,argon2)
da1b30bd 130 ("curl" ,curl) ; XC_NETWORKING
3374dcc7 131 ("libgcrypt" ,libgcrypt)
da1b30bd 132 ("libsodium" ,libsodium) ; XC_BROWSER
99672f7b
EF
133 ("libxi" ,libxi)
134 ("libxtst" ,libxtst)
135 ("qtbase" ,qtbase)
136 ("qtx11extras" ,qtx11extras)
137 ("zlib" ,zlib)))
138 (native-inputs
139 `(("qttools" ,qttools)))
140 (home-page "https://www.keepassxc.org")
141 (synopsis "Password manager")
142 (description "KeePassXC is a password manager or safe which helps you to
143manage your passwords in a secure way. You can put all your passwords in one
144database, which is locked with one master key or a key-file which can be stored
145on an external storage device. The databases are encrypted using the
146algorithms AES or Twofish.")
147 ;; Non functional parts use various licences.
148 (license license:gpl3)))
149
e8647227
EF
150(define-public keepassx
151 (package
152 (name "keepassx")
a00fbe8a 153 (version "2.0.3")
e8647227
EF
154 (source
155 (origin
156 (method url-fetch)
e5be0e01
EF
157 (uri (string-append "https://www.keepassx.org/releases/" version
158 "/keepassx-" version ".tar.gz"))
e8647227 159 (sha256
2c5e4976 160 (base32
a00fbe8a 161 "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
e8647227
EF
162 (build-system cmake-build-system)
163 (inputs
164 `(("libgcrypt" ,libgcrypt)
a00fbe8a 165 ("libxi" ,libxi)
e8647227
EF
166 ("libxtst" ,libxtst)
167 ("qt" ,qt-4)))
168 (native-inputs
169 `(("zlib" ,zlib)))
170 (home-page "https://www.keepassx.org")
171 (synopsis "Password manager")
172 (description "KeePassX is a password manager or safe which helps you to
173manage your passwords in a secure way. You can put all your passwords in one
174database, which is locked with one master key or a key-file which can be stored
175on an external storage device. The databases are encrypted using the
176algorithms AES or Twofish.")
177 ;; Non functional parts use various licences.
b7ac10e6
EF
178 (license license:gpl3)
179 (properties `((superseded . ,keepassxc)))))
dd24e906
DT
180
181(define-public shroud
182 (package
183 (name "shroud")
b4aa6d3d 184 (version "0.1.1")
dd24e906
DT
185 (source (origin
186 (method url-fetch)
a652eb93 187 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
dd24e906
DT
188 version ".tar.gz"))
189 (sha256
190 (base32
b4aa6d3d 191 "1y43yhgy2zbrk5bqj3qyx9rkcz2bma9sinlrg7dip3jqms9gq4lr"))))
dd24e906 192 (build-system gnu-build-system)
df0e8a23
SB
193 (arguments
194 '(#:phases
195 (modify-phases %standard-phases
196 (add-after 'install 'wrap-shroud
197 (lambda* (#:key outputs #:allow-other-keys)
198 (let* ((out (assoc-ref outputs "out"))
199 (ccachedir (string-append out "/lib/guile/2.0/ccache"))
200 (prog (string-append out "/bin/shroud")))
201 (wrap-program prog
202 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
203 #t))))))
dd24e906
DT
204 (inputs
205 `(("guile" ,guile-2.0)
206 ("gnupg" ,gnupg)
207 ("xclip" ,xclip)))
208 (synopsis "GnuPG-based secret manager")
209 (description "Shroud is a simple secret manager with a command line
210interface. The password database is stored as a Scheme s-expression and
211encrypted with a GnuPG key. Secrets consist of an arbitrary number of
212key/value pairs, making Shroud suitable for more than just password storage.
213For copying and pasting secrets into web browsers and other graphical
214applications, there is xclip integration." )
59d915ac 215 (home-page "https://dthompson.us/projects/shroud.html")
dd24e906 216 (license license:gpl3+)))
7e9b07bd
AP
217
218(define-public yapet
219 (package
220 (name "yapet")
3d63422c 221 (version "1.1")
7e9b07bd
AP
222 (source (origin
223 (method url-fetch)
224 (uri (string-append "http://www.guengel.ch/myapps/yapet/downloads/yapet-"
225 version
226 ".tar.bz2"))
227 (sha256
228 (base32
3d63422c 229 "1lq46mpxdsbl6qw4cj58hp9q7jckmyvbsi08p5zr77rjgqadxyyy"))))
7e9b07bd
AP
230 (build-system gnu-build-system)
231 (inputs
232 `(("ncurses" ,ncurses)
233 ("openssl" ,openssl)))
234 (native-inputs
235 `(("pkg-config" ,pkg-config)))
236 (synopsis "Yet Another Password Encryption Tool")
237 (description "YAPET is a text based password manager using the Blowfish
238encryption algorithm. Because of its small footprint and very few library
239dependencies, it is suited for installing on desktop and server systems alike.
240The text based user interface allows you to run YAPET easily in a Secure Shell
241session. Two companion utilities enable users to convert CSV files to YAPET
242and vice versa.")
243 (home-page "http://www.guengel.ch/myapps/yapet/")
244 (license license:gpl3+)))
72029c8b
SB
245
246(define-public cracklib
247 (package
248 (name "cracklib")
249 (version "2.9.6")
250 (source (origin
251 (method url-fetch)
252 (uri (string-append "https://github.com/cracklib/cracklib/"
253 "releases/download/" name "-" version "/"
254 name "-" version ".tar.gz"))
b0a56764
LF
255 (patches (search-patches "cracklib-CVE-2016-6318.patch"
256 "cracklib-fix-buffer-overflow.patch"))
72029c8b
SB
257 (sha256
258 (base32
259 "0hrkb0prf7n92w6rxgq0ilzkk6rkhpys2cfqkrbzswp27na7dkqp"))))
260 (build-system gnu-build-system)
261 (synopsis "Password checking library")
262 (home-page "https://github.com/cracklib/cracklib")
263 (description
264 "CrackLib is a library containing a C function which may be used in a
b1a686bb
TGR
265@command{passwd}-like program. The idea is simple: try to prevent users from
266choosing passwords that could easily be guessed (or \"cracked\") by filtering
267them out, at the source.")
72029c8b 268 (license license:lgpl2.1)))
c2fb2076
SB
269
270(define-public libpwquality
271 (package
272 (name "libpwquality")
4a577fef 273 (version "1.4.0")
c2fb2076
SB
274 (source (origin
275 (method url-fetch)
276 (uri (list
c18594dd
EJ
277 (string-append "https://github.com/" name "/" name
278 "/releases/download/" name "-" version
279 "/" name "-" version ".tar.bz2")
c2fb2076
SB
280 (string-append "https://launchpad.net/libpwquality/trunk/"
281 version "/+download/"
282 name "-" version ".tar.bz2")))
283 (sha256
284 (base32
4a577fef 285 "0syyz8r54l8mqmbb0mw19qz4z2cx8gdgidicb8k2s5zjdh2gzrhx"))))
c2fb2076
SB
286 (build-system gnu-build-system)
287 (arguments
288 ;; XXX: have RUNPATH issue.
289 '(#:configure-flags '("--disable-python-bindings")))
290 (inputs
291 `(("cracklib" ,cracklib)))
292 (synopsis "Password quality checker")
c18594dd 293 (home-page "https://github.com/libpwquality/libpwquality")
c2fb2076
SB
294 (description
295 "Libpwquality is a library for password quality checking and generation of
296random passwords that pass the checks.")
297 (license license:gpl2+)))
3d4f9d5c
CAW
298
299(define-public assword
300 (package
301 (name "assword")
d504de26 302 (version "0.11")
3d4f9d5c
CAW
303 (source (origin
304 (method url-fetch)
305 (uri (list
306 (string-append
307 "http://http.debian.net/debian/pool/main/a/assword/"
308 "assword_" version ".orig.tar.gz")))
309 (sha256
310 (base32
d504de26 311 "03gkb6kvsghznbcw5l7nmrc6mn3ixkjd5jcs96ni4zs9l47jf7yp"))))
3d4f9d5c 312 (arguments
f339f277 313 `(;; irritatingly, tests do run but not there are two problems:
3d4f9d5c
CAW
314 ;; - "import gtk" fails for unknown reasons here despite it the
315 ;; program working (indeed, I've found I have to do a logout and log
316 ;; back in in after an install order for some mumbo jumbo environment
317 ;; variable mess to work with pygtk and assword... what's up with
318 ;; that?)
319 ;; - even when the tests fail, they don't return a nonzero status,
320 ;; so I'm not sure how to programmatically get that information
321 #:tests? #f
322 #:phases
323 (modify-phases %standard-phases
0050876b
SB
324 (add-after 'install 'wrap-assword
325 (lambda* (#:key outputs #:allow-other-keys)
326 (let ((prog (string-append
327 (assoc-ref outputs "out")
328 "/bin/assword"))
329 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
330 (wrap-program prog
331 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
332 #t)))
3d4f9d5c
CAW
333 (add-after 'install 'manpage
334 (lambda* (#:key outputs #:allow-other-keys)
335 (and
f339f277
LF
336 ;; Without this substitution, it fails with
337 ;; ImportError: No module named 'gpg'
338 (substitute* "Makefile"
339 (("PYTHONPATH=.") ""))
3d4f9d5c
CAW
340 (zero? (system* "make" "assword.1"))
341 (install-file
342 "assword.1"
343 (string-append (assoc-ref outputs "out") "/share/man/man1"))))))))
344 (build-system python-build-system)
345 (native-inputs
f339f277 346 `(("txt2man" ,txt2man)))
3d4f9d5c 347 (inputs
0050876b
SB
348 `(("gtk+" ,gtk+)
349 ("python-xdo" ,python-xdo)
f339f277
LF
350 ("python-gpg" ,python-gpg)
351 ("python-pygobject" ,python-pygobject)))
3d4f9d5c
CAW
352 (propagated-inputs
353 `(("xclip" ,xclip)))
354 (home-page "https://finestructure.net/assword/")
355 (synopsis "Password manager")
356 (description "assword is a simple password manager using GPG-wrapped
357JSON files. It has a command line interface as well as a very simple
358graphical interface, which can even \"type\" your passwords into
359any X11 window.")
360 (license license:gpl3+)))
c285a400
JT
361
362(define-public password-store
363 (package
364 (name "password-store")
3e9aa5cf 365 (version "1.7.3")
c285a400
JT
366 (source (origin
367 (method url-fetch)
368 (uri
369 (string-append "https://git.zx2c4.com/password-store/snapshot/"
370 name "-" version ".tar.xz"))
371 (sha256
372 (base32
3e9aa5cf 373 "1x53k5dn3cdmvy8m4fqdld4hji5n676ksl0ql4armkmsds26av1b"))))
c285a400
JT
374 (build-system gnu-build-system)
375 (arguments
376 '(#:phases
377 (modify-phases %standard-phases
378 (delete 'configure)
619f98fa 379 (delete 'build)
177475cf
JL
380 (add-before 'install 'patch-passmenu-path
381 (lambda* (#:key inputs #:allow-other-keys)
382 (substitute* "contrib/dmenu/passmenu"
383 (("dmenu") (string-append (assoc-ref inputs "dmenu")
384 "/bin/dmenu"))
385 (("xdotool") (string-append (assoc-ref inputs "xdotool")
386 "/bin/xdotool")))
387 #t))
388 (add-after 'install 'install-passmenu
389 (lambda* (#:key outputs #:allow-other-keys)
e9ce6425
TGR
390 (let* ((out (assoc-ref outputs "out"))
391 (bin (string-append out "/bin")))
392 (install-file "contrib/dmenu/passmenu" bin)
177475cf 393 #t)))
61201e46
AG
394 (add-after 'install 'wrap-path
395 (lambda* (#:key inputs outputs #:allow-other-keys)
396 (let ((out (assoc-ref outputs "out"))
397 (path (map (lambda (pkg)
398 (string-append (assoc-ref inputs pkg) "/bin"))
81635fb6 399 '("coreutils" "getopt" "git" "gnupg" "qrencode"
61201e46
AG
400 "sed" "tree" "which" "xclip"))))
401 (wrap-program (string-append out "/bin/pass")
718c1278
MB
402 `("PATH" ":" prefix (,(string-join path ":"))))
403 #t)))
404 (add-after 'wrap-path 'install-shell-completions
405 (lambda* (#:key outputs #:allow-other-keys)
406 (let* ((out (assoc-ref outputs "out"))
407 (bashcomp (string-append out "/etc/bash_completion.d")))
408 ;; TODO: install fish and zsh completions.
409 (mkdir-p bashcomp)
410 (copy-file "src/completion/pass.bash-completion"
411 (string-append bashcomp "/pass"))
412 #t))))
c285a400 413 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
a77f0360
CB
414 ;; Parallel tests may cause a race condition leading to a
415 ;; timeout in some circumstances.
416 #:parallel-tests? #f
c285a400 417 #:test-target "test"))
61201e46 418 (inputs
177475cf
JL
419 `(("dmenu" ,dmenu)
420 ("getopt" ,util-linux)
61201e46
AG
421 ("git" ,git)
422 ("gnupg" ,gnupg)
81635fb6 423 ("qrencode" ,qrencode)
61201e46
AG
424 ("sed" ,sed)
425 ("tree" ,tree)
426 ("which" ,which)
177475cf
JL
427 ("xclip" ,xclip)
428 ("xdotool" ,xdotool)))
62ab60aa 429 (home-page "https://www.passwordstore.org/")
c285a400
JT
430 (synopsis "Encrypted password manager")
431 (description "Password-store is a password manager which uses GnuPG to
432store and retrieve passwords. The tool stores each password in its own
433GnuPG-encrypted file, allowing the program to be simple yet secure.
434Synchronization is possible using the integrated git support, which commits
435changes to your password database to a git repository that can be managed
436through the pass command.")
437 (license license:gpl2+)))
6d32dd8c
LG
438
439(define-public argon2
440 (package
441 (name "argon2")
c06bf6a3 442 (version "20171227")
6d32dd8c
LG
443 (source
444 (origin
445 (method url-fetch)
446 (uri
1feeb2e0
TGR
447 (string-append "https://github.com/P-H-C/phc-winner-argon2/archive/"
448 version ".tar.gz"))
6d32dd8c
LG
449 (file-name (string-append name "-" version ".tar.gz"))
450 (sha256
451 (base32
c06bf6a3 452 "1n6w5y3va7lrcym7cxr0nikapldqm80wxjdns584bvplq5r03spa"))))
6d32dd8c
LG
453 (build-system gnu-build-system)
454 (arguments
455 `(#:test-target "test"
c06bf6a3
MB
456 #:make-flags '("CC=gcc"
457 "OPTTEST=1") ;disable CPU optimization
6d32dd8c
LG
458 #:phases
459 (modify-phases %standard-phases
c06bf6a3
MB
460 (add-after 'unpack 'patch-Makefile
461 (lambda* (#:key outputs #:allow-other-keys)
462 (let ((out (assoc-ref outputs "out")))
463 (substitute* "Makefile"
464 (("PREFIX = /usr") (string-append "PREFIX = " out)))
037d1851
AB
465 (substitute* "libargon2.pc"
466 (("prefix=/usr") (string-append "prefix=" out))
467 (("@HOST_MULTIARCH@") "")
468 (("@UPSTREAM_VER@") ,version))
c06bf6a3 469 #t)))
037d1851
AB
470 (delete 'configure)
471 (add-after 'install 'install-argon2.pc
472 (lambda* (#:key outputs #:allow-other-keys)
473 (let ((out (assoc-ref outputs "out")))
474 (install-file "libargon2.pc"
475 (string-append out "/lib/pkgconfig"))
476 #t))))))
6d32dd8c
LG
477 (home-page "https://www.argon2.com/")
478 (synopsis "Password hashing library")
479 (description "Argon2 provides a key derivation function that was declared
480winner of the 2015 Password Hashing Competition.")
c06bf6a3
MB
481 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
482 ;; files are CC0 only; see README.md and LICENSE for details.
483 (license (list license:cc0 license:asl2.0))))
153e58c5 484
a1714ff5
JL
485(define-public pass-git-helper
486 (package
487 (name "pass-git-helper")
488 (version "0.3.1")
489 (source
490 (origin
491 (method url-fetch)
492 (uri (string-append "https://github.com/languitar/pass-git-helper/archive/release-"
493 version ".tar.gz"))
494 (sha256
495 (base32
496 "0lz5ncy44pz7z1j2nnyildx8sq33zi3xvg5nkwg25n11nasqh2xn"))))
497 (build-system python-build-system)
498 (arguments
499 `(#:phases
500 (modify-phases %standard-phases
501 (add-before 'build 'patch-pass-path
502 (lambda* (#:key inputs #:allow-other-keys)
503 (let* ((password-store (assoc-ref inputs "password-store"))
504 (pass (string-append password-store "/bin/pass")))
505 (substitute* "pass-git-helper"
506 (("'pass'") (string-append "'" pass "'")))
507 #t))))))
508 (inputs
509 `(("python-pyxdg" ,python-pyxdg)
510 ("password-store" ,password-store)))
511 (home-page "https://github.com/languitar/pass-git-helper")
512 (synopsis "Git credential helper interfacing with pass")
513 (description "pass-git-helper is a git credential helper which allows to
514use pass, the standard unix password manager, as the credential backend for
515your git repositories. This is achieved by explicitly defining mappings
516between hosts and entries in the password store.")
517 (license license:lgpl3+)))
eb28a777
EB
518
519(define-public john-the-ripper-jumbo
520 (let ((official-version "1.8.0")
521 (jumbo-version "1"))
522 (package
523 (name "john-the-ripper-jumbo")
524 (version (string-append official-version "-" jumbo-version))
525 (source
526 (origin
527 (method url-fetch)
528 (uri (string-append "http://www.openwall.com/john/j/john-"
529 official-version "-jumbo-" jumbo-version ".tar.xz"))
530 (sha256
531 (base32
532 "08q92sfdvkz47rx6qjn7qv57cmlpy7i7rgddapq5384mb413vjds"))
533 (patches
534 (list (origin
535 (method url-fetch)
536 (uri (string-append "https://github.com/magnumripper/"
537 "JohnTheRipper/commit/"
538 "e2e868db3e153b3f959e119a51703d4afb99c624.patch"))
539 (file-name "john-the-ripper-jumbo-gcc5-inline.patch")
540 (sha256
541 (base32
542 "1shvcf1y2097115mxhzdkm64dr106a8zr6pqjqyh171q5ng5vfra")))
543 (origin
544 (method url-fetch)
545 (uri (string-append "https://github.com/magnumripper/"
546 "JohnTheRipper/commit/"
547 "480e95b0e449863be3e1a5b0bc634a67df28b618.patch"))
548 (file-name "john-the-ripper-jumbo-non-x86.patch")
549 (sha256
550 (base32
551 "1ffd9dvhk0sb6ss8dv5yalh01lz30i7rilqilf2xv68gax2hyjqx")))))))
552 (build-system gnu-build-system)
553 (inputs
554 `(("gmp" ,gmp)
555 ("krb5" ,mit-krb5)
556 ("libpcap" ,libpcap)
557 ("nss" ,nss)
558 ("openssl" ,openssl)
559 ("zlib" ,zlib)))
560 (arguments
561 `(#:configure-flags
562 (list (string-append
563 "CFLAGS=-O2 -g "
564 "-DJOHN_SYSTEMWIDE=1 "
565 "-DJOHN_SYSTEMWIDE_EXEC='\"" %output "/libexec/john\"' "
566 "-DJOHN_SYSTEMWIDE_HOME='\"" %output "/share/john\"'")
567 ;; For now, do not test for instruction set in configure, and
568 ;; do not pass '-march=native' to gcc:
569 "--disable-native-tests"
570 "--disable-native-macro")
571 #:tests? #f ;tests try to create '.john' in the build user's $HOME
572 #:phases
573 (modify-phases %standard-phases
574 (add-before 'configure 'chdir-src
575 (lambda _ (chdir "src")))
576 (replace 'install
577 (lambda _
578 (let ((bindir (string-append %output "/bin"))
579 (docdir (string-append %output "/share/doc/john"))
580 (execdir (string-append %output "/libexec/john"))
581 (homedir (string-append %output "/share/john"))
582 (install-file-to (lambda (dir)
583 (lambda (f) (install-file f dir))))
584 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
585 (with-directory-excursion "../run"
586 (for-each (install-file-to execdir)
587 (cons* "mailer" "benchmark-unify"
588 (find-files "." ".*\\.(py|rb|pl)")))
589 (for-each (install-file-to homedir)
590 (append (find-files "." "(stats|dictionary.*)")
591 (find-files "." "(.*\\.chr|.*\\.lst)")
592 (find-files "." ".*\\.conf")))
593 (for-each (install-file-to bindir)
594 '("tgtsnarf" "genmkvpwd" "mkvcalcproba"
595 "raw2dyna" "luks2john" "vncpcap2john"
596 "uaf2john" "calc_stat" "wpapcap2john"
597 "cprepair" "relbench" "SIPdump" "john"))
598 (for-each (lambda (f) ;install symlinked aliases
599 (symlink "john"
600 (string-append bindir "/" (basename f))))
601 (find-files "." symlink?)))
602 (copy-recursively "../doc" docdir)
603 #t))))))
604 (home-page "http://www.openwall.com/john/")
605 (synopsis "Password cracker")
606 (description "John the Ripper is a fast password cracker. Its primary
607purpose is to detect weak Unix passwords. Besides several @code{crypt}
608password hash types most commonly found on various Unix systems, supported out
609of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
610is the community-enhanced, \"jumbo\" version of John the Ripper.")
611 (license license:gpl2+))))
649eb8b5
KH
612
613(define-public sala
614 (package
615 (name "sala")
616 (version "1.3")
617 (source
618 (origin
619 (method url-fetch)
620 (uri (pypi-uri "sala" version))
621 (sha256
622 (base32
623 "13qgmc3i2a0cqp8jqrfl93lnphfagb32pgfikc1gza2a14asxzi8"))))
624 (build-system python-build-system)
625 (arguments
626 ;; Sala is supposed to work with Python 3.2 or higher,
627 ;; but it doesn't work with Python 3.6. Better stick
628 ;; to Python 2, which works fine.
629 `(#:python ,python-2))
630 (propagated-inputs
631 `(("gnupg" ,gnupg)
632 ("pwgen" ,pwgen)))
633 (home-page "http://www.digip.org/sala/")
634 (synopsis "Encrypted plaintext password store")
635 (description
636 "Store passwords and other bits of sensitive plain-text information
637to encrypted files on a directory hierarchy. The information is protected
638by GnuPG's symmetrical encryption.")
639 (license license:expat)))
d4e0ebd0
T
640
641(define-public fpm2
642 (package
643 (name "fpm2")
644 (version "0.79")
645 (source (origin
646 (method url-fetch)
647 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
648 version ".tar.bz2"))
649 (sha256
650 (base32
651 "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
652 (build-system gnu-build-system)
653 (inputs `(("gtk2" ,gtk+-2)
654 ("gnupg" ,gnupg)
655 ("libxml2" ,libxml2)))
656 (native-inputs `(("pkg-config" ,pkg-config)
657 ("intltool" ,intltool)))
658 (arguments
659 `(#:phases
660 (modify-phases %standard-phases
661 (add-before 'configure 'pre-configure
662 ;; The file po/POTFILES.in ends up missing for some reason in
663 ;; both nix and guix builds. Adding the file with contents
664 ;; found during troubleshooting.
665 (lambda _
666 (call-with-output-file "po/POTFILES.in"
667 (lambda (port)
668 (format port "data/fpm2.desktop.in
669data/fpm2.desktop.in.in
670fpm2.glade
671src/callbacks.c
672src/fpm.c
673src/fpm_file.c
674src/interface.c
675src/support.c
676fpm2.glade
677")))
678 #t)))))
679 (synopsis "Manage, generate and store passwords encrypted")
680 (description "FPM2 is GTK2 port from Figaro's Password Manager
681originally developed by John Conneely, with some new enhancements.
682
683Upstream development seems to have stopped. It is therefore recommended
684to use a different password manager.")
685 (home-page "https://als.regnet.cz/fpm2/")
686 (license license:gpl2+)))
20b51b17
AI
687
688(define-public pass-rotate
689 (package
690 (name "pass-rotate")
691 (version "0.1")
692 (source
693 (origin
694 (method url-fetch)
695 (uri (string-append "https://github.com/SirCmpwn/pass-rotate/archive/"
696 version ".tar.gz"))
697 (sha256
698 (base32
699 "1svm5nj8bczv2dg8lh2zqqhbsrljqsw9680r03qwgl9vlci90210"))
700 (file-name (string-append name "-" version ".tar.gz"))))
701 (build-system python-build-system)
702 (inputs
703 `(("python-beautifulsoup4" ,python-beautifulsoup4)
704 ("python-docopt" ,python-docopt)
705 ("python-html5lib" ,python-html5lib)
706 ("python-requests" ,python-requests)))
707 (home-page "https://github.com/SirCmpwn/pass-rotate")
708 (synopsis "Rotate password on online services")
709 (description "pass-rotate is a command line utility and python library for
710rotating passwords on various web services. It makes it easier to rotate your
711passwords, one at a time or in bulk, when security events or routine upkeep of
712your online accounts makes it necessary.")
713 (license license:expat)))
c10aa278
PN
714
715(define-public hashcat
716 (package
717 (name "hashcat")
718 (version "4.1.0")
719 (source
720 (origin
721 (method url-fetch)
722 (uri (string-append "https://hashcat.net/files/hashcat-"
723 version ".tar.gz"))
724 (sha256
725 (base32
726 "170i2y32ykgzb1qf1wz3klwn31c09bviz4x3bnrwia65adqrj8xx"))))
727 (native-inputs
728 `(("opencl-headers" ,opencl-headers)))
729 (build-system gnu-build-system)
730 (arguments
731 '(#:tests? #f ;no tests
732 #:make-flags (list (string-append "PREFIX=" %output))
733 #:phases
734 (modify-phases %standard-phases
735 (delete 'configure))))
736 (home-page "https://hashcat.net/hashcat/")
737 (synopsis "Advanced password recovery utility")
738 (description "Hashcat is an password recovery utility, supporting five
739unique modes of attack for over 200 highly-optimized hashing algorithms.
740Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
741Linux, Windows, and macOS, and has facilities to help enable distributed
742password cracking.")
743 (license license:expat)))
eb4ffe9b
PN
744
745(define-public hashcat-utils
746 (package
747 (name "hashcat-utils")
748 (version "1.8")
749 (source
750 (origin
751 (method url-fetch)
752 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/download/v"
753 version "/hashcat-utils-1.8.7z"))
754 (sha256
755 (base32
756 "1x80rngjz7gkhwplhw1iqr0wzb6hjkrjfld2kz9kmgp5dr9nys1p"))))
757 (native-inputs
758 `(("p7zip" ,p7zip)))
759 (inputs
760 `(("perl" ,perl)))
761 (build-system gnu-build-system)
762 (arguments
763 `(#:tests? #f ;no tests
764 #:make-flags (list "CC=gcc"
765 ;; Upstream bug(?): "make all" seems to remove the
766 ;; Perl scripts from the source.
767 "native")
768 #:phases
769 (modify-phases %standard-phases
770 (replace 'unpack
771 (lambda* (#:key source #:allow-other-keys)
772 (invoke "7z" "x" source)
773 (chdir (string-append "hashcat-utils-" ,version "/src"))
774 #t))
775 (delete 'configure)
776 (replace 'install
777 (lambda* (#:key outputs #:allow-other-keys)
778 (let ((out (string-append (assoc-ref outputs "out") "/bin")))
779 (mkdir-p out)
780 (for-each (lambda (file)
781 (copy-file file (string-append out "/" (basename file ".bin"))))
782 (find-files "." "\\.bin$"))
783 (for-each (lambda (file)
784 (copy-file file (string-append out "/" (basename file ".pl"))))
785 (find-files "../bin" "\\.pl$"))
786 #t))))))
787 (home-page "https://github.com/hashcat/hashcat-utils/")
788 (synopsis "Small utilities that are useful in advanced password cracking")
789 (description "Hashcat-utils are a set of small utilities that are useful
790in advanced password cracking. They all are packed into multiple stand-alone
791binaries. All of these utils are designed to execute only one specific
792function. Since they all work with @code{STDIN} and @code{STDOUT} you can
793group them into chains.")
794 (license license:expat)))