gnu: Add envstore.
[jackhill/guix/guix.git] / gnu / packages / password-utils.scm
index 1ca327b..30ed130 100644 (file)
@@ -1,7 +1,10 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
-;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Aljosha Papsch <misc@rpapsch.de>
+;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
+;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se>
+;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
   #:use-module (guix packages)
+  #:use-module (gnu packages admin)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages xorg))
+  #:use-module (gnu packages xorg)
+  #:use-module (guix build-system python))
 
 (define-public pwgen
   (package
@@ -57,14 +68,15 @@ human.")
 (define-public keepassx
   (package
     (name "keepassx")
-    (version "2.0")
+    (version "2.0.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.keepassx.org/releases/" version
                            "/keepassx-" version ".tar.gz"))
        (sha256
-        (base32 "1ri2r1sldc62hbg74m4pmci0nrjwvv38rqhyzhyjin247an0zd0f"))))
+        (base32
+         "1f1nlbd669rmpzr52d9dgfgclg4jcaq2jkrby3b8q1vjkksdqjr0"))))
     (build-system cmake-build-system)
     (inputs
      `(("libgcrypt" ,libgcrypt)
@@ -135,3 +147,151 @@ session.  Two companion utilities enable users to convert CSV files to YAPET
 and vice versa.")
     (home-page "http://www.guengel.ch/myapps/yapet/")
     (license license:gpl3+)))
+
+(define-public cracklib
+  (package
+    (name "cracklib")
+    (version "2.9.6")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/cracklib/cracklib/"
+                                  "releases/download/" name "-" version "/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0hrkb0prf7n92w6rxgq0ilzkk6rkhpys2cfqkrbzswp27na7dkqp"))))
+    (build-system gnu-build-system)
+    (synopsis "Password checking library")
+    (home-page "https://github.com/cracklib/cracklib")
+    (description
+     "CrackLib is a library containing a C function which may be used in a
+passwd like program.  The idea is simple: try to prevent users from choosing
+passwords that could be guessed by crack by filtering them out, at source.")
+    (license license:lgpl2.1)))
+
+(define-public libpwquality
+  (package
+    (name "libpwquality")
+    (version "1.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (list
+                    (string-append "https://fedorahosted.org/releases/l/i/"
+                                   name "/" name "-" version ".tar.bz2")
+                    (string-append "https://launchpad.net/libpwquality/trunk/"
+                                   version "/+download/"
+                                   name "-" version ".tar.bz2")))
+              (sha256
+               (base32
+                "0aidriag6h0syfm33nzdfdsqgrnsgihwjv3a5lgkqch3w68fmlkl"))))
+    (build-system gnu-build-system)
+    (arguments
+     ;; XXX: have RUNPATH issue.
+     '(#:configure-flags '("--disable-python-bindings")))
+    (inputs
+     `(("cracklib" ,cracklib)))
+    (synopsis "Password quality checker")
+    (home-page "https://fedorahosted.org/libpwquality/")
+    (description
+     "Libpwquality is a library for password quality checking and generation of
+random passwords that pass the checks.")
+    (license license:gpl2+)))
+
+(define-public assword
+  (package
+    (name "assword")
+    (version "0.8")
+    (source (origin
+              (method url-fetch)
+              (uri (list
+                    (string-append
+                     "http://http.debian.net/debian/pool/main/a/assword/"
+                     "assword_" version ".orig.tar.gz")))
+              (sha256
+               (base32
+                "0dl4wizbi0r21wxzykm8s445xbvqim5nabi799dmpkdnnh8i546i"))))
+    (arguments
+     `(#:python ,python-2
+       ;; irritatingly, tests do run but not there are two problems:
+       ;;  - "import gtk" fails for unknown reasons here despite it the
+       ;;    program working (indeed, I've found I have to do a logout and log
+       ;;    back in in after an install order for some mumbo jumbo environment
+       ;;    variable mess to work with pygtk and assword... what's up with
+       ;;    that?)
+       ;;  - even when the tests fail, they don't return a nonzero status,
+       ;;    so I'm not sure how to programmatically get that information
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'manpage
+           (lambda* (#:key outputs #:allow-other-keys)
+             (and
+              (zero? (system* "make" "assword.1"))
+              (install-file
+               "assword.1"
+               (string-append (assoc-ref outputs "out") "/share/man/man1"))))))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("help2man" ,help2man)))
+    (inputs
+     `(("python-setuptools" ,python2-setuptools)
+       ("python2-xdo" ,python2-xdo)
+       ("python2-pygpgme" ,python2-pygpgme)
+       ("python2-pygtk" ,python2-pygtk)))
+    (propagated-inputs
+     `(("xclip" ,xclip)))
+    (home-page "https://finestructure.net/assword/")
+    (synopsis "Password manager")
+    (description "assword is a simple password manager using GPG-wrapped
+JSON files.  It has a command line interface as well as a very simple
+graphical interface, which can even \"type\" your passwords into
+any X11 window.")
+    (license license:gpl3+)))
+
+(define-public password-store
+  (package
+    (name "password-store")
+    (version "1.6.5")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://git.zx2c4.com/password-store/snapshot/"
+                              name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "05bk3lrp5jwg0v338lvylp7glpliydzz4jf5pjr6k3kagrv3jyik"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after
+          ;; The script requires 'getopt' at run-time, and this allows
+          ;; the user to not install the providing package 'util-linux'
+          ;; in their profile.
+          'unpack 'patch-path
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let ((getopt (string-append (assoc-ref inputs "getopt")
+                                         "/bin/getopt")))
+              (substitute* "src/password-store.sh"
+                (("GETOPT=\"getopt\"")
+                 (string-append "GETOPT=\"" getopt "\"")))
+              #t))))
+       #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
+       #:test-target "test"))
+    (native-inputs `(("getopt" ,util-linux))) ; getopt for the tests
+    (inputs `(("gnupg" ,gnupg)
+              ("pwgen" ,pwgen)
+              ("xclip" ,xclip)
+              ("git" ,git)
+              ("tree" ,tree)
+              ("which" ,which)))
+    (home-page "http://www.passwordstore.org/")
+    (synopsis "Encrypted password manager")
+    (description "Password-store is a password manager which uses GnuPG to
+store and retrieve passwords.  The tool stores each password in its own
+GnuPG-encrypted file, allowing the program to be simple yet secure.
+Synchronization is possible using the integrated git support, which commits
+changes to your password database to a git repository that can be managed
+through the pass command.")
+    (license license:gpl2+)))