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