gnu: Add cl-ana.statistical-learning.
[jackhill/guix/guix.git] / gnu / packages / password-utils.scm
index 955a1a4..db5f54e 100644 (file)
@@ -23,6 +23,7 @@
 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
 ;;; Copyright © 2018, 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
+;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
@@ -112,7 +114,7 @@ human.")
 (define-public keepassxc
   (package
     (name "keepassxc")
-    (version "2.5.0")
+    (version "2.5.1")
     (source
      (origin
        (method url-fetch)
@@ -121,7 +123,7 @@ human.")
                            version "-src.tar.xz"))
        (sha256
         (base32
-         "10bq2934xqpjpr99wbjg2vwmi73fcq0419cb3v78n2kj5fbwwnb3"))))
+         "0c5g5hn2cr2m00xgpxg884ihy8gnn09kc487y1m9jywshn5jaczg"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags '("-DWITH_XC_ALL=YES"
@@ -292,21 +294,22 @@ applications, there is xclip integration." )
 (define-public yapet
   (package
     (name "yapet")
-    (version "1.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://www.guengel.ch/myapps/yapet/downloads/yapet-"
-                                  version
-                                  ".tar.bz2"))
-              (sha256
-               (base32
-                "1lq46mpxdsbl6qw4cj58hp9q7jckmyvbsi08p5zr77rjgqadxyyy"))))
+    (version "2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
+                           version ".tar.xz"))
+       (sha256
+        (base32 "1fl4s7v1psl52ndd6i7716i9f493aj8ipl6lgmraadnn5h26l3pm"))))
     (build-system gnu-build-system)
     (inputs
-     `(("ncurses" ,ncurses)
+     `(("argon2" ,argon2)
+       ("ncurses" ,ncurses)
        ("openssl" ,openssl)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("cppunit" ,cppunit)
+       ("pkg-config" ,pkg-config)))
     (synopsis "Yet Another Password Encryption Tool")
     (description "YAPET is a text based password manager using the Blowfish
 encryption algorithm.  Because of its small footprint and very few library
@@ -351,19 +354,19 @@ them out, at the source.")
 (define-public libpwquality
   (package
     (name "libpwquality")
-    (version "1.4.0")
+    (version "1.4.2")
     (source (origin
               (method url-fetch)
               (uri (list
-                    (string-append "https://github.com/" name "/" name
-                                   "/releases/download/" name  "-" version
-                                   "/" name "-" version ".tar.bz2")
+                    (string-append "https://github.com/libpwquality/libpwquality"
+                                   "/releases/download/libpwquality-" version
+                                   "/libpwquality-" version ".tar.bz2")
                     (string-append "https://launchpad.net/libpwquality/trunk/"
                                    version "/+download/"
-                                   name "-" version ".tar.bz2")))
+                                   "libpwquality-" version ".tar.bz2")))
               (sha256
                (base32
-                "0syyz8r54l8mqmbb0mw19qz4z2cx8gdgidicb8k2s5zjdh2gzrhx"))))
+                "13hw532fmzc5xjpy75d74rlfdlxf2a8ibb4hyy9c0s92wsgf0qsj"))))
     (build-system gnu-build-system)
     (arguments
      ;; XXX: have RUNPATH issue.
@@ -511,6 +514,7 @@ any X11 window.")
     (native-search-paths
      (list (search-path-specification
             (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
+            (separator #f)                        ;single entry
             (files '("lib/password-store/extensions")))))
     (inputs
      `(("dmenu" ,dmenu)
@@ -654,6 +658,49 @@ templates, clipboard handling, and per folder settings for multi-recipient
 encryption.")
     (license license:gpl3+)))
 
+(define-public rofi-pass
+  (package
+    (name "rofi-pass")
+    (version "2.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://raw.githubusercontent.com/carnager/rofi-pass/"
+                       version "/rofi-pass"))
+       (sha256
+        (base32 "0msldkndqp40nx1s5s7ggcr97ir4nshpmnyzvj5hqw1l7m3gvw6j"))
+       (file-name name)))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((source (string-append (assoc-ref %build-inputs "source")))
+               (script "rofi-pass")
+               (out (assoc-ref %outputs "out")))
+           (copy-file source script)
+           (chmod script #o555)
+           (install-file script (string-append out "/bin"))))))
+    (propagated-inputs
+     `(("password-store" ,password-store)
+       ("rofi" ,rofi)
+       ("xdotool" ,xdotool)))
+    (home-page "https://github.com/carnager/rofi-pass")
+    (synopsis "Rofi frontend for password-store")
+    (description "Rofi-pass provides a way to manipulate information stored
+using password-store through rofi interface:
+@enumerate
+@item open URLs of entries with hotkey;
+@item type any field from entry;
+@item auto-typing of user and/or password fields;
+@item auto-typing username based on path;
+@item auto-typing of more than one field, using the autotype entry;
+@item bookmarks mode (open stored URLs in browser, default: Alt+x).
+@end enumerate")
+    (license license:gpl3)))
+
 (define-public argon2
   (package
     (name "argon2")
@@ -775,7 +822,6 @@ between hosts and entries in the password store.")
                          (string-prefix? "i686" system)) "sse2")
                     ((string-prefix? "aarch" system) "neon")
                     (else "no")))))
-         #:tests? #f ;tests try to create '.john' in the build user's $HOME
          #:phases
          (modify-phases %standard-phases
            (add-before 'configure 'chdir-src
@@ -821,7 +867,13 @@ between hosts and entries in the password store.")
                                      (find-files "." ".*\\.conf")))
                    (copy-recursively "rules" (string-append datadir "/rules")))
                  (copy-recursively "../doc" docdir)
-                 #t))))))
+                 #t)))
+           (delete 'check) ; Tests need installed .conf files; move after install
+           (add-after 'install 'check
+             (lambda args
+               (setenv "HOME" "/tmp")   ; Some tests need to write to ~/.john
+               (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
+               (apply (assoc-ref %standard-phases 'check) args))))))
       (home-page "http://www.openwall.com/john/")
       (synopsis "Password cracker")
       (description "John the Ripper is a fast password cracker.  Its primary