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