gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / password-utils.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
3 ;;; Copyright © 2015, 2016 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 ;;;
12 ;;; This file is part of GNU Guix.
13 ;;;
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
18 ;;;
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
23 ;;;
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27 (define-module (gnu packages password-utils)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix build-system cmake)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix download)
32 #:use-module (guix packages)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages admin)
35 #:use-module (gnu packages aidc)
36 #:use-module (gnu packages base)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages glib)
39 #:use-module (gnu packages gnupg)
40 #:use-module (gnu packages gtk)
41 #:use-module (gnu packages guile)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages man)
44 #:use-module (gnu packages ncurses)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages tls)
48 #:use-module (gnu packages qt)
49 #:use-module (gnu packages version-control)
50 #:use-module (gnu packages xdisorg)
51 #:use-module (gnu packages xorg)
52 #:use-module (guix build-system python))
53
54 (define-public pwgen
55 (package
56 (name "pwgen")
57 (version "2.07")
58 (source
59 (origin
60 (method url-fetch)
61 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
62 "/pwgen-" version ".tar.gz"))
63 (sha256
64 (base32 "0mhmw700kkh238fzivcwnwi94bj9f3h36yfh3k3j2v19b0zmjx7b"))))
65 (build-system gnu-build-system)
66 (arguments
67 `(#:tests? #f)) ; no test suite
68 (home-page "http://pwgen.sourceforge.net/")
69 (synopsis "Password generator")
70 (description "Pwgen generates passwords which can be easily memorized by a
71 human.")
72 (license license:gpl2)))
73
74 (define-public keepassx
75 (package
76 (name "keepassx")
77 (version "2.0.3")
78 (source
79 (origin
80 (method url-fetch)
81 (uri (string-append "https://www.keepassx.org/releases/" version
82 "/keepassx-" version ".tar.gz"))
83 (sha256
84 (base32
85 "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
86 (build-system cmake-build-system)
87 (inputs
88 `(("libgcrypt" ,libgcrypt)
89 ("libxi" ,libxi)
90 ("libxtst" ,libxtst)
91 ("qt" ,qt-4)))
92 (native-inputs
93 `(("zlib" ,zlib)))
94 (home-page "https://www.keepassx.org")
95 (synopsis "Password manager")
96 (description "KeePassX is a password manager or safe which helps you to
97 manage your passwords in a secure way. You can put all your passwords in one
98 database, which is locked with one master key or a key-file which can be stored
99 on an external storage device. The databases are encrypted using the
100 algorithms AES or Twofish.")
101 ;; Non functional parts use various licences.
102 (license license:gpl3)))
103
104 (define-public shroud
105 (package
106 (name "shroud")
107 (version "0.1.1")
108 (source (origin
109 (method url-fetch)
110 (uri (string-append "http://files.dthompson.us/shroud/shroud-"
111 version ".tar.gz"))
112 (sha256
113 (base32
114 "1y43yhgy2zbrk5bqj3qyx9rkcz2bma9sinlrg7dip3jqms9gq4lr"))))
115 (build-system gnu-build-system)
116 (arguments
117 '(#:phases
118 (modify-phases %standard-phases
119 (add-after 'install 'wrap-shroud
120 (lambda* (#:key outputs #:allow-other-keys)
121 (let* ((out (assoc-ref outputs "out"))
122 (ccachedir (string-append out "/lib/guile/2.0/ccache"))
123 (prog (string-append out "/bin/shroud")))
124 (wrap-program prog
125 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))
126 #t))))))
127 (inputs
128 `(("guile" ,guile-2.0)
129 ("gnupg" ,gnupg)
130 ("xclip" ,xclip)))
131 (synopsis "GnuPG-based secret manager")
132 (description "Shroud is a simple secret manager with a command line
133 interface. The password database is stored as a Scheme s-expression and
134 encrypted with a GnuPG key. Secrets consist of an arbitrary number of
135 key/value pairs, making Shroud suitable for more than just password storage.
136 For copying and pasting secrets into web browsers and other graphical
137 applications, there is xclip integration." )
138 (home-page "http://dthompson.us/pages/software/shroud.html")
139 (license license:gpl3+)))
140
141 (define-public yapet
142 (package
143 (name "yapet")
144 (version "1.0")
145 (source (origin
146 (method url-fetch)
147 (uri (string-append "http://www.guengel.ch/myapps/yapet/downloads/yapet-"
148 version
149 ".tar.bz2"))
150 (sha256
151 (base32
152 "0ydbnqw6icdh07pnv2w6dhvq501bdfvrklv4xmyr8znca9d753if"))))
153 (build-system gnu-build-system)
154 (inputs
155 `(("ncurses" ,ncurses)
156 ("openssl" ,openssl)))
157 (native-inputs
158 `(("pkg-config" ,pkg-config)))
159 (synopsis "Yet Another Password Encryption Tool")
160 (description "YAPET is a text based password manager using the Blowfish
161 encryption algorithm. Because of its small footprint and very few library
162 dependencies, it is suited for installing on desktop and server systems alike.
163 The text based user interface allows you to run YAPET easily in a Secure Shell
164 session. Two companion utilities enable users to convert CSV files to YAPET
165 and vice versa.")
166 (home-page "http://www.guengel.ch/myapps/yapet/")
167 (license license:gpl3+)))
168
169 (define-public cracklib
170 (package
171 (name "cracklib")
172 (version "2.9.6")
173 (source (origin
174 (method url-fetch)
175 (uri (string-append "https://github.com/cracklib/cracklib/"
176 "releases/download/" name "-" version "/"
177 name "-" version ".tar.gz"))
178 (patches (search-patches "cracklib-CVE-2016-6318.patch"
179 "cracklib-fix-buffer-overflow.patch"))
180 (sha256
181 (base32
182 "0hrkb0prf7n92w6rxgq0ilzkk6rkhpys2cfqkrbzswp27na7dkqp"))))
183 (build-system gnu-build-system)
184 (synopsis "Password checking library")
185 (home-page "https://github.com/cracklib/cracklib")
186 (description
187 "CrackLib is a library containing a C function which may be used in a
188 passwd like program. The idea is simple: try to prevent users from choosing
189 passwords that could be guessed by crack by filtering them out, at source.")
190 (license license:lgpl2.1)))
191
192 (define-public libpwquality
193 (package
194 (name "libpwquality")
195 (version "1.3.0")
196 (source (origin
197 (method url-fetch)
198 (uri (list
199 (string-append "https://fedorahosted.org/releases/l/i/"
200 name "/" name "-" version ".tar.bz2")
201 (string-append "https://launchpad.net/libpwquality/trunk/"
202 version "/+download/"
203 name "-" version ".tar.bz2")))
204 (sha256
205 (base32
206 "0aidriag6h0syfm33nzdfdsqgrnsgihwjv3a5lgkqch3w68fmlkl"))))
207 (build-system gnu-build-system)
208 (arguments
209 ;; XXX: have RUNPATH issue.
210 '(#:configure-flags '("--disable-python-bindings")))
211 (inputs
212 `(("cracklib" ,cracklib)))
213 (synopsis "Password quality checker")
214 (home-page "https://fedorahosted.org/libpwquality/")
215 (description
216 "Libpwquality is a library for password quality checking and generation of
217 random passwords that pass the checks.")
218 (license license:gpl2+)))
219
220 (define-public assword
221 (package
222 (name "assword")
223 (version "0.10")
224 (source (origin
225 (method url-fetch)
226 (uri (list
227 (string-append
228 "http://http.debian.net/debian/pool/main/a/assword/"
229 "assword_" version ".orig.tar.gz")))
230 (sha256
231 (base32
232 "0l6170y6my1gprqkazvzabgjkrkr9v2q7z48vjflna4r323yqira"))))
233 (arguments
234 `(;; irritatingly, tests do run but not there are two problems:
235 ;; - "import gtk" fails for unknown reasons here despite it the
236 ;; program working (indeed, I've found I have to do a logout and log
237 ;; back in in after an install order for some mumbo jumbo environment
238 ;; variable mess to work with pygtk and assword... what's up with
239 ;; that?)
240 ;; - even when the tests fail, they don't return a nonzero status,
241 ;; so I'm not sure how to programmatically get that information
242 #:tests? #f
243 #:phases
244 (modify-phases %standard-phases
245 (add-after 'install 'wrap-assword
246 (lambda* (#:key outputs #:allow-other-keys)
247 (let ((prog (string-append
248 (assoc-ref outputs "out")
249 "/bin/assword"))
250 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
251 (wrap-program prog
252 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
253 #t)))
254 (add-after 'install 'manpage
255 (lambda* (#:key outputs #:allow-other-keys)
256 (and
257 ;; Without this substitution, it fails with
258 ;; ImportError: No module named 'gpg'
259 (substitute* "Makefile"
260 (("PYTHONPATH=.") ""))
261 (zero? (system* "make" "assword.1"))
262 (install-file
263 "assword.1"
264 (string-append (assoc-ref outputs "out") "/share/man/man1"))))))))
265 (build-system python-build-system)
266 (native-inputs
267 `(("txt2man" ,txt2man)))
268 (inputs
269 `(("gtk+" ,gtk+)
270 ("python-xdo" ,python-xdo)
271 ("python-gpg" ,python-gpg)
272 ("python-pygobject" ,python-pygobject)))
273 (propagated-inputs
274 `(("xclip" ,xclip)))
275 (home-page "https://finestructure.net/assword/")
276 (synopsis "Password manager")
277 (description "assword is a simple password manager using GPG-wrapped
278 JSON files. It has a command line interface as well as a very simple
279 graphical interface, which can even \"type\" your passwords into
280 any X11 window.")
281 (license license:gpl3+)))
282
283 (define-public password-store
284 (package
285 (name "password-store")
286 (version "1.7")
287 (source (origin
288 (method url-fetch)
289 (uri
290 (string-append "https://git.zx2c4.com/password-store/snapshot/"
291 name "-" version ".tar.xz"))
292 (sha256
293 (base32
294 "002mw7j0m33bw483rllzhcf41wp3ixka8yma6kqrfaj57jyw66hn"))))
295 (build-system gnu-build-system)
296 (arguments
297 '(#:phases
298 (modify-phases %standard-phases
299 (delete 'configure)
300 (delete 'build)
301 (add-after 'install 'wrap-path
302 (lambda* (#:key inputs outputs #:allow-other-keys)
303 (let ((out (assoc-ref outputs "out"))
304 (path (map (lambda (pkg)
305 (string-append (assoc-ref inputs pkg) "/bin"))
306 '("coreutils" "getopt" "git" "gnupg" "qrencode"
307 "sed" "tree" "which" "xclip"))))
308 (wrap-program (string-append out "/bin/pass")
309 `("PATH" ":" prefix (,(string-join path ":"))))
310 #t)))
311 (add-after 'wrap-path 'install-shell-completions
312 (lambda* (#:key outputs #:allow-other-keys)
313 (let* ((out (assoc-ref outputs "out"))
314 (bashcomp (string-append out "/etc/bash_completion.d")))
315 ;; TODO: install fish and zsh completions.
316 (mkdir-p bashcomp)
317 (copy-file "src/completion/pass.bash-completion"
318 (string-append bashcomp "/pass"))
319 #t))))
320 #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
321 ;; Parallel tests may cause a race condition leading to a
322 ;; timeout in some circumstances.
323 #:parallel-tests? #f
324 #:test-target "test"))
325 (inputs
326 `(("getopt" ,util-linux)
327 ("git" ,git)
328 ("gnupg" ,gnupg)
329 ("qrencode" ,qrencode)
330 ("sed" ,sed)
331 ("tree" ,tree)
332 ("which" ,which)
333 ("xclip" ,xclip)))
334 (home-page "http://www.passwordstore.org/")
335 (synopsis "Encrypted password manager")
336 (description "Password-store is a password manager which uses GnuPG to
337 store and retrieve passwords. The tool stores each password in its own
338 GnuPG-encrypted file, allowing the program to be simple yet secure.
339 Synchronization is possible using the integrated git support, which commits
340 changes to your password database to a git repository that can be managed
341 through the pass command.")
342 (license license:gpl2+)))
343
344 (define-public argon2
345 (package
346 (name "argon2")
347 (version "20161029")
348 (source
349 (origin
350 (method url-fetch)
351 (uri
352 (string-append "https://github.com/P-H-C/phc-winner-argon2/archive/"
353 version ".tar.gz"))
354 (file-name (string-append name "-" version ".tar.gz"))
355 (sha256
356 (base32
357 "1rymikbysasdadm325jx69i0q19d9srqkny69jwmhswlidr4j07y"))))
358 (build-system gnu-build-system)
359 (arguments
360 `(#:test-target "test"
361 #:make-flags '("CC=gcc")
362 #:phases
363 (modify-phases %standard-phases
364 (delete 'configure)
365 (replace 'install
366 (lambda _
367 (let ((out (assoc-ref %outputs "out")))
368 (install-file "argon2" (string-append out "/bin"))
369 (install-file "libargon2.a" (string-append out "/lib"))
370 (install-file "libargon2.so" (string-append out "/lib"))
371 (copy-recursively "include"
372 (string-append out "/include"))))))))
373 (home-page "https://www.argon2.com/")
374 (synopsis "Password hashing library")
375 (description "Argon2 provides a key derivation function that was declared
376 winner of the 2015 Password Hashing Competition.")
377 (license license:cc0)))
378
379 (define-public python-bcrypt
380 (package
381 (name "python-bcrypt")
382 (version "3.1.0")
383 (source
384 (origin
385 (method url-fetch)
386 (uri (pypi-uri "bcrypt" version))
387 (sha256
388 (base32
389 "1giy0dvd8gvq6flxh44np1v2nqwsji5qsnrz038mgwzgp7c20j75"))))
390 (build-system python-build-system)
391 (native-inputs
392 `(("python-pycparser" ,python-pycparser)
393 ("python-pytest" ,python-pytest)))
394 (propagated-inputs
395 `(("python-cffi" ,python-cffi)
396 ("python-six" ,python-six)))
397 (home-page "https://github.com/pyca/bcrypt/")
398 (synopsis
399 "Modern password hashing library")
400 (description
401 "Bcrypt is a Python module which provides a password hashing method based
402 on the Blowfish password hashing algorithm, as described in
403 @url{http://static.usenix.org/events/usenix99/provos.html,\"A Future-Adaptable
404 Password Scheme\"} by Niels Provos and David Mazieres.")
405 (license license:asl2.0)))
406
407 (define-public python2-bcrypt
408 (package-with-python2 python-bcrypt))