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