password-utils.scm 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
  3. ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
  4. ;;; Copyright © 2015 Aljosha Papsch <misc@rpapsch.de>
  5. ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
  6. ;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se>
  7. ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
  8. ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
  9. ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
  10. ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
  11. ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
  12. ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
  13. ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
  14. ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
  15. ;;;
  16. ;;; This file is part of GNU Guix.
  17. ;;;
  18. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  19. ;;; under the terms of the GNU General Public License as published by
  20. ;;; the Free Software Foundation; either version 3 of the License, or (at
  21. ;;; your option) any later version.
  22. ;;;
  23. ;;; GNU Guix is distributed in the hope that it will be useful, but
  24. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  25. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. ;;; GNU General Public License for more details.
  27. ;;;
  28. ;;; You should have received a copy of the GNU General Public License
  29. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  30. (define-module (gnu packages password-utils)
  31. #:use-module ((guix licenses) #:prefix license:)
  32. #:use-module (guix build-system cmake)
  33. #:use-module (guix build-system gnu)
  34. #:use-module (guix download)
  35. #:use-module (guix packages)
  36. #:use-module (gnu packages)
  37. #:use-module (gnu packages admin)
  38. #:use-module (gnu packages aidc)
  39. #:use-module (gnu packages base)
  40. #:use-module (gnu packages compression)
  41. #:use-module (gnu packages freedesktop)
  42. #:use-module (gnu packages glib)
  43. #:use-module (gnu packages gnupg)
  44. #:use-module (gnu packages gnuzilla)
  45. #:use-module (gnu packages gtk)
  46. #:use-module (gnu packages guile)
  47. #:use-module (gnu packages kerberos)
  48. #:use-module (gnu packages linux)
  49. #:use-module (gnu packages man)
  50. #:use-module (gnu packages multiprecision)
  51. #:use-module (gnu packages ncurses)
  52. #:use-module (gnu packages pkg-config)
  53. #:use-module (gnu packages python)
  54. #:use-module (gnu packages tls)
  55. #:use-module (gnu packages qt)
  56. #:use-module (gnu packages version-control)
  57. #:use-module (gnu packages xdisorg)
  58. #:use-module (gnu packages xorg)
  59. #:use-module (guix build-system python))
  60. (define-public pwgen
  61. (package
  62. (name "pwgen")
  63. (version "2.07")
  64. (source
  65. (origin
  66. (method url-fetch)
  67. (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
  68. "/pwgen-" version ".tar.gz"))
  69. (sha256
  70. (base32 "0mhmw700kkh238fzivcwnwi94bj9f3h36yfh3k3j2v19b0zmjx7b"))))
  71. (build-system gnu-build-system)
  72. (arguments
  73. `(#:tests? #f)) ; no test suite
  74. (home-page "http://pwgen.sourceforge.net/")
  75. (synopsis "Password generator")
  76. (description "Pwgen generates passwords which can be easily memorized by a
  77. human.")
  78. (license license:gpl2)))
  79. (define-public keepassxc
  80. (package
  81. (name "keepassxc")
  82. (version "2.2.0")
  83. (source
  84. (origin
  85. (method url-fetch)
  86. (uri (string-append "https://github.com/keepassxreboot/" name
  87. "/releases/download/" version "/keepassxc-"
  88. version "-src.tar.xz"))
  89. (sha256
  90. (base32
  91. "0nby6aq6w8g7c9slzahf7i34sbj8majf8rhmqqww87v6kaypxi3i"))))
  92. (build-system cmake-build-system)
  93. (inputs
  94. `(("libgcrypt" ,libgcrypt)
  95. ("libxi" ,libxi)
  96. ("libxtst" ,libxtst)
  97. ("qtbase" ,qtbase)
  98. ("qtx11extras" ,qtx11extras)
  99. ("zlib" ,zlib)))
  100. (native-inputs
  101. `(("qttools" ,qttools)))
  102. (home-page "https://www.keepassxc.org")
  103. (synopsis "Password manager")
  104. (description "KeePassXC is a password manager or safe which helps you to
  105. manage your passwords in a secure way. You can put all your passwords in one
  106. database, which is locked with one master key or a key-file which can be stored
  107. on an external storage device. The databases are encrypted using the
  108. algorithms AES or Twofish.")
  109. ;; Non functional parts use various licences.
  110. (license license:gpl3)))
  111. (define-public keepassx
  112. (package
  113. (name "keepassx")
  114. (version "2.0.3")
  115. (source
  116. (origin
  117. (method url-fetch)
  118. (uri (string-append "https://www.keepassx.org/releases/" version
  119. "/keepassx-" version ".tar.gz"))
  120. (sha256
  121. (base32
  122. "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
  123. (build-system cmake-build-system)
  124. (inputs
  125. `(("libgcrypt" ,libgcrypt)
  126. ("libxi" ,libxi)
  127. ("libxtst" ,libxtst)
  128. ("qt" ,qt-4)))
  129. (native-inputs
  130. `(("zlib" ,zlib)))
  131. (home-page "https://www.keepassx.org")
  132. (synopsis "Password manager")
  133. (description "KeePassX is a password manager or safe which helps you to
  134. manage your passwords in a secure way. You can put all your passwords in one
  135. database, which is locked with one master key or a key-file which can be stored
  136. on an external storage device. The databases are encrypted using the
  137. algorithms AES or Twofish.")
  138. ;; Non functional parts use various licences.
  139. (license license:gpl3)
  140. (properties `((superseded . ,keepassxc)))))
  141. (define-public shroud
  142. (package
  143. (name "shroud")
  144. (version "0.1.1")
  145. (source (origin
  146. (method url-fetch)
  147. (uri (string-append "https://files.dthompson.us/shroud/shroud-"
  148. version ".tar.gz"))
  149. (sha256
  150. (base32
  151. "1y43yhgy2zbrk5bqj3qyx9rkcz2bma9sinlrg7dip3jqms9gq4lr"))))
  152. (build-system gnu-build-system)
  153. (arguments
  154. '(#:phases
  155. (modify-phases %standard-phases
  156. (add-after 'install 'wrap-shroud
  157. (lambda* (#:key outputs #:allow-other-keys)
  158. (let* ((out (assoc-ref outputs "out"))
  159. (ccachedir (string-append out "/lib/guile/2.0/ccache"))
  160. (prog (string-append out "/bin/shroud")))
  161. (wrap-program prog
  162. `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
  163. #t))))))
  164. (inputs
  165. `(("guile" ,guile-2.0)
  166. ("gnupg" ,gnupg)
  167. ("xclip" ,xclip)))
  168. (synopsis "GnuPG-based secret manager")
  169. (description "Shroud is a simple secret manager with a command line
  170. interface. The password database is stored as a Scheme s-expression and
  171. encrypted with a GnuPG key. Secrets consist of an arbitrary number of
  172. key/value pairs, making Shroud suitable for more than just password storage.
  173. For copying and pasting secrets into web browsers and other graphical
  174. applications, there is xclip integration." )
  175. (home-page "https://dthompson.us/projects/shroud.html")
  176. (license license:gpl3+)))
  177. (define-public yapet
  178. (package
  179. (name "yapet")
  180. (version "1.0")
  181. (source (origin
  182. (method url-fetch)
  183. (uri (string-append "http://www.guengel.ch/myapps/yapet/downloads/yapet-"
  184. version
  185. ".tar.bz2"))
  186. (sha256
  187. (base32
  188. "0ydbnqw6icdh07pnv2w6dhvq501bdfvrklv4xmyr8znca9d753if"))))
  189. (build-system gnu-build-system)
  190. (inputs
  191. `(("ncurses" ,ncurses)
  192. ("openssl" ,openssl)))
  193. (native-inputs
  194. `(("pkg-config" ,pkg-config)))
  195. (synopsis "Yet Another Password Encryption Tool")
  196. (description "YAPET is a text based password manager using the Blowfish
  197. encryption algorithm. Because of its small footprint and very few library
  198. dependencies, it is suited for installing on desktop and server systems alike.
  199. The text based user interface allows you to run YAPET easily in a Secure Shell
  200. session. Two companion utilities enable users to convert CSV files to YAPET
  201. and vice versa.")
  202. (home-page "http://www.guengel.ch/myapps/yapet/")
  203. (license license:gpl3+)))
  204. (define-public cracklib
  205. (package
  206. (name "cracklib")
  207. (version "2.9.6")
  208. (source (origin
  209. (method url-fetch)
  210. (uri (string-append "https://github.com/cracklib/cracklib/"
  211. "releases/download/" name "-" version "/"
  212. name "-" version ".tar.gz"))
  213. (patches (search-patches "cracklib-CVE-2016-6318.patch"
  214. "cracklib-fix-buffer-overflow.patch"))
  215. (sha256
  216. (base32
  217. "0hrkb0prf7n92w6rxgq0ilzkk6rkhpys2cfqkrbzswp27na7dkqp"))))
  218. (build-system gnu-build-system)
  219. (synopsis "Password checking library")
  220. (home-page "https://github.com/cracklib/cracklib")
  221. (description
  222. "CrackLib is a library containing a C function which may be used in a
  223. @command{passwd}-like program. The idea is simple: try to prevent users from
  224. choosing passwords that could easily be guessed (or \"cracked\") by filtering
  225. them out, at the source.")
  226. (license license:lgpl2.1)))
  227. (define-public libpwquality
  228. (package
  229. (name "libpwquality")
  230. (version "1.4.0")
  231. (source (origin
  232. (method url-fetch)
  233. (uri (list
  234. (string-append "https://github.com/" name "/" name
  235. "/releases/download/" name "-" version
  236. "/" name "-" version ".tar.bz2")
  237. (string-append "https://launchpad.net/libpwquality/trunk/"
  238. version "/+download/"
  239. name "-" version ".tar.bz2")))
  240. (sha256
  241. (base32
  242. "0syyz8r54l8mqmbb0mw19qz4z2cx8gdgidicb8k2s5zjdh2gzrhx"))))
  243. (build-system gnu-build-system)
  244. (arguments
  245. ;; XXX: have RUNPATH issue.
  246. '(#:configure-flags '("--disable-python-bindings")))
  247. (inputs
  248. `(("cracklib" ,cracklib)))
  249. (synopsis "Password quality checker")
  250. (home-page "https://github.com/libpwquality/libpwquality")
  251. (description
  252. "Libpwquality is a library for password quality checking and generation of
  253. random passwords that pass the checks.")
  254. (license license:gpl2+)))
  255. (define-public assword
  256. (package
  257. (name "assword")
  258. (version "0.10")
  259. (source (origin
  260. (method url-fetch)
  261. (uri (list
  262. (string-append
  263. "http://http.debian.net/debian/pool/main/a/assword/"
  264. "assword_" version ".orig.tar.gz")))
  265. (sha256
  266. (base32
  267. "0l6170y6my1gprqkazvzabgjkrkr9v2q7z48vjflna4r323yqira"))))
  268. (arguments
  269. `(;; irritatingly, tests do run but not there are two problems:
  270. ;; - "import gtk" fails for unknown reasons here despite it the
  271. ;; program working (indeed, I've found I have to do a logout and log
  272. ;; back in in after an install order for some mumbo jumbo environment
  273. ;; variable mess to work with pygtk and assword... what's up with
  274. ;; that?)
  275. ;; - even when the tests fail, they don't return a nonzero status,
  276. ;; so I'm not sure how to programmatically get that information
  277. #:tests? #f
  278. #:phases
  279. (modify-phases %standard-phases
  280. (add-after 'install 'wrap-assword
  281. (lambda* (#:key outputs #:allow-other-keys)
  282. (let ((prog (string-append
  283. (assoc-ref outputs "out")
  284. "/bin/assword"))
  285. (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
  286. (wrap-program prog
  287. `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
  288. #t)))
  289. (add-after 'install 'manpage
  290. (lambda* (#:key outputs #:allow-other-keys)
  291. (and
  292. ;; Without this substitution, it fails with
  293. ;; ImportError: No module named 'gpg'
  294. (substitute* "Makefile"
  295. (("PYTHONPATH=.") ""))
  296. (zero? (system* "make" "assword.1"))
  297. (install-file
  298. "assword.1"
  299. (string-append (assoc-ref outputs "out") "/share/man/man1"))))))))
  300. (build-system python-build-system)
  301. (native-inputs
  302. `(("txt2man" ,txt2man)))
  303. (inputs
  304. `(("gtk+" ,gtk+)
  305. ("python-xdo" ,python-xdo)
  306. ("python-gpg" ,python-gpg)
  307. ("python-pygobject" ,python-pygobject)))
  308. (propagated-inputs
  309. `(("xclip" ,xclip)))
  310. (home-page "https://finestructure.net/assword/")
  311. (synopsis "Password manager")
  312. (description "assword is a simple password manager using GPG-wrapped
  313. JSON files. It has a command line interface as well as a very simple
  314. graphical interface, which can even \"type\" your passwords into
  315. any X11 window.")
  316. (license license:gpl3+)))
  317. (define-public password-store
  318. (package
  319. (name "password-store")
  320. (version "1.7.1")
  321. (source (origin
  322. (method url-fetch)
  323. (uri
  324. (string-append "https://git.zx2c4.com/password-store/snapshot/"
  325. name "-" version ".tar.xz"))
  326. (sha256
  327. (base32
  328. "0scqkpll2q8jhzcgcsh9kqz0gwdpvynivqjmmbzax2irjfaiklpn"))))
  329. (build-system gnu-build-system)
  330. (arguments
  331. '(#:phases
  332. (modify-phases %standard-phases
  333. (delete 'configure)
  334. (delete 'build)
  335. (add-after 'install 'wrap-path
  336. (lambda* (#:key inputs outputs #:allow-other-keys)
  337. (let ((out (assoc-ref outputs "out"))
  338. (path (map (lambda (pkg)
  339. (string-append (assoc-ref inputs pkg) "/bin"))
  340. '("coreutils" "getopt" "git" "gnupg" "qrencode"
  341. "sed" "tree" "which" "xclip"))))
  342. (wrap-program (string-append out "/bin/pass")
  343. `("PATH" ":" prefix (,(string-join path ":"))))
  344. #t)))
  345. (add-after 'wrap-path 'install-shell-completions
  346. (lambda* (#:key outputs #:allow-other-keys)
  347. (let* ((out (assoc-ref outputs "out"))
  348. (bashcomp (string-append out "/etc/bash_completion.d")))
  349. ;; TODO: install fish and zsh completions.
  350. (mkdir-p bashcomp)
  351. (copy-file "src/completion/pass.bash-completion"
  352. (string-append bashcomp "/pass"))
  353. #t))))
  354. #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
  355. ;; Parallel tests may cause a race condition leading to a
  356. ;; timeout in some circumstances.
  357. #:parallel-tests? #f
  358. #:test-target "test"))
  359. (inputs
  360. `(("getopt" ,util-linux)
  361. ("git" ,git)
  362. ("gnupg" ,gnupg)
  363. ("qrencode" ,qrencode)
  364. ("sed" ,sed)
  365. ("tree" ,tree)
  366. ("which" ,which)
  367. ("xclip" ,xclip)))
  368. (home-page "http://www.passwordstore.org/")
  369. (synopsis "Encrypted password manager")
  370. (description "Password-store is a password manager which uses GnuPG to
  371. store and retrieve passwords. The tool stores each password in its own
  372. GnuPG-encrypted file, allowing the program to be simple yet secure.
  373. Synchronization is possible using the integrated git support, which commits
  374. changes to your password database to a git repository that can be managed
  375. through the pass command.")
  376. (license license:gpl2+)))
  377. (define-public argon2
  378. (package
  379. (name "argon2")
  380. (version "20161029")
  381. (source
  382. (origin
  383. (method url-fetch)
  384. (uri
  385. (string-append "https://github.com/P-H-C/phc-winner-argon2/archive/"
  386. version ".tar.gz"))
  387. (file-name (string-append name "-" version ".tar.gz"))
  388. (sha256
  389. (base32
  390. "1rymikbysasdadm325jx69i0q19d9srqkny69jwmhswlidr4j07y"))))
  391. (build-system gnu-build-system)
  392. (arguments
  393. `(#:test-target "test"
  394. #:make-flags '("CC=gcc")
  395. #:phases
  396. (modify-phases %standard-phases
  397. (delete 'configure)
  398. (replace 'install
  399. (lambda _
  400. (let ((out (assoc-ref %outputs "out")))
  401. (install-file "argon2" (string-append out "/bin"))
  402. (install-file "libargon2.a" (string-append out "/lib"))
  403. (install-file "libargon2.so" (string-append out "/lib"))
  404. (copy-recursively "include"
  405. (string-append out "/include"))))))))
  406. (home-page "https://www.argon2.com/")
  407. (synopsis "Password hashing library")
  408. (description "Argon2 provides a key derivation function that was declared
  409. winner of the 2015 Password Hashing Competition.")
  410. (license license:cc0)))
  411. (define-public python-bcrypt
  412. (package
  413. (name "python-bcrypt")
  414. (version "3.1.0")
  415. (source
  416. (origin
  417. (method url-fetch)
  418. (uri (pypi-uri "bcrypt" version))
  419. (sha256
  420. (base32
  421. "1giy0dvd8gvq6flxh44np1v2nqwsji5qsnrz038mgwzgp7c20j75"))))
  422. (build-system python-build-system)
  423. (native-inputs
  424. `(("python-pycparser" ,python-pycparser)
  425. ("python-pytest" ,python-pytest)))
  426. (propagated-inputs
  427. `(("python-cffi" ,python-cffi)
  428. ("python-six" ,python-six)))
  429. (home-page "https://github.com/pyca/bcrypt/")
  430. (synopsis
  431. "Modern password hashing library")
  432. (description
  433. "Bcrypt is a Python module which provides a password hashing method based
  434. on the Blowfish password hashing algorithm, as described in
  435. @url{http://static.usenix.org/events/usenix99/provos.html,\"A Future-Adaptable
  436. Password Scheme\"} by Niels Provos and David Mazieres.")
  437. (license license:asl2.0)))
  438. (define-public python2-bcrypt
  439. (package-with-python2 python-bcrypt))
  440. (define-public pass-git-helper
  441. (package
  442. (name "pass-git-helper")
  443. (version "0.3.1")
  444. (source
  445. (origin
  446. (method url-fetch)
  447. (uri (string-append "https://github.com/languitar/pass-git-helper/archive/release-"
  448. version ".tar.gz"))
  449. (sha256
  450. (base32
  451. "0lz5ncy44pz7z1j2nnyildx8sq33zi3xvg5nkwg25n11nasqh2xn"))))
  452. (build-system python-build-system)
  453. (arguments
  454. `(#:phases
  455. (modify-phases %standard-phases
  456. (add-before 'build 'patch-pass-path
  457. (lambda* (#:key inputs #:allow-other-keys)
  458. (let* ((password-store (assoc-ref inputs "password-store"))
  459. (pass (string-append password-store "/bin/pass")))
  460. (substitute* "pass-git-helper"
  461. (("'pass'") (string-append "'" pass "'")))
  462. #t))))))
  463. (inputs
  464. `(("python-pyxdg" ,python-pyxdg)
  465. ("password-store" ,password-store)))
  466. (home-page "https://github.com/languitar/pass-git-helper")
  467. (synopsis "Git credential helper interfacing with pass")
  468. (description "pass-git-helper is a git credential helper which allows to
  469. use pass, the standard unix password manager, as the credential backend for
  470. your git repositories. This is achieved by explicitly defining mappings
  471. between hosts and entries in the password store.")
  472. (license license:lgpl3+)))
  473. (define-public john-the-ripper-jumbo
  474. (let ((official-version "1.8.0")
  475. (jumbo-version "1"))
  476. (package
  477. (name "john-the-ripper-jumbo")
  478. (version (string-append official-version "-" jumbo-version))
  479. (source
  480. (origin
  481. (method url-fetch)
  482. (uri (string-append "http://www.openwall.com/john/j/john-"
  483. official-version "-jumbo-" jumbo-version ".tar.xz"))
  484. (sha256
  485. (base32
  486. "08q92sfdvkz47rx6qjn7qv57cmlpy7i7rgddapq5384mb413vjds"))
  487. (patches
  488. (list (origin
  489. (method url-fetch)
  490. (uri (string-append "https://github.com/magnumripper/"
  491. "JohnTheRipper/commit/"
  492. "e2e868db3e153b3f959e119a51703d4afb99c624.patch"))
  493. (file-name "john-the-ripper-jumbo-gcc5-inline.patch")
  494. (sha256
  495. (base32
  496. "1shvcf1y2097115mxhzdkm64dr106a8zr6pqjqyh171q5ng5vfra")))
  497. (origin
  498. (method url-fetch)
  499. (uri (string-append "https://github.com/magnumripper/"
  500. "JohnTheRipper/commit/"
  501. "480e95b0e449863be3e1a5b0bc634a67df28b618.patch"))
  502. (file-name "john-the-ripper-jumbo-non-x86.patch")
  503. (sha256
  504. (base32
  505. "1ffd9dvhk0sb6ss8dv5yalh01lz30i7rilqilf2xv68gax2hyjqx")))))))
  506. (build-system gnu-build-system)
  507. (inputs
  508. `(("gmp" ,gmp)
  509. ("krb5" ,mit-krb5)
  510. ("libpcap" ,libpcap)
  511. ("nss" ,nss)
  512. ("openssl" ,openssl)
  513. ("zlib" ,zlib)))
  514. (arguments
  515. `(#:configure-flags
  516. (list (string-append
  517. "CFLAGS=-O2 -g "
  518. "-DJOHN_SYSTEMWIDE=1 "
  519. "-DJOHN_SYSTEMWIDE_EXEC='\"" %output "/libexec/john\"' "
  520. "-DJOHN_SYSTEMWIDE_HOME='\"" %output "/share/john\"'")
  521. ;; For now, do not test for instruction set in configure, and
  522. ;; do not pass '-march=native' to gcc:
  523. "--disable-native-tests"
  524. "--disable-native-macro")
  525. #:tests? #f ;tests try to create '.john' in the build user's $HOME
  526. #:phases
  527. (modify-phases %standard-phases
  528. (add-before 'configure 'chdir-src
  529. (lambda _ (chdir "src")))
  530. (replace 'install
  531. (lambda _
  532. (let ((bindir (string-append %output "/bin"))
  533. (docdir (string-append %output "/share/doc/john"))
  534. (execdir (string-append %output "/libexec/john"))
  535. (homedir (string-append %output "/share/john"))
  536. (install-file-to (lambda (dir)
  537. (lambda (f) (install-file f dir))))
  538. (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
  539. (with-directory-excursion "../run"
  540. (for-each (install-file-to execdir)
  541. (cons* "mailer" "benchmark-unify"
  542. (find-files "." ".*\\.(py|rb|pl)")))
  543. (for-each (install-file-to homedir)
  544. (append (find-files "." "(stats|dictionary.*)")
  545. (find-files "." "(.*\\.chr|.*\\.lst)")
  546. (find-files "." ".*\\.conf")))
  547. (for-each (install-file-to bindir)
  548. '("tgtsnarf" "genmkvpwd" "mkvcalcproba"
  549. "raw2dyna" "luks2john" "vncpcap2john"
  550. "uaf2john" "calc_stat" "wpapcap2john"
  551. "cprepair" "relbench" "SIPdump" "john"))
  552. (for-each (lambda (f) ;install symlinked aliases
  553. (symlink "john"
  554. (string-append bindir "/" (basename f))))
  555. (find-files "." symlink?)))
  556. (copy-recursively "../doc" docdir)
  557. #t))))))
  558. (home-page "http://www.openwall.com/john/")
  559. (synopsis "Password cracker")
  560. (description "John the Ripper is a fast password cracker. Its primary
  561. purpose is to detect weak Unix passwords. Besides several @code{crypt}
  562. password hash types most commonly found on various Unix systems, supported out
  563. of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
  564. is the community-enhanced, \"jumbo\" version of John the Ripper.")
  565. (license license:gpl2+))))