gnu: Add python-pyshp.
[jackhill/guix/guix.git] / gnu / packages / password-utils.scm
index 27e032d..9c8912c 100644 (file)
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 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>
@@ -9,10 +9,10 @@
 ;;; Copyright © 2016, 2019, 2020 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
 ;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2017, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
-;;; Copyright © 2018, 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
+;;; Copyright © 2018, 2019, 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org>
+;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages admin)
   #:use-module (gnu packages aidc)
   #:use-module (gnu packages authentication)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages cryptsetup)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages docbook)
   #:use-module (gnu packages file)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
@@ -119,7 +126,7 @@ human.")
 (define-public keepassxc
   (package
     (name "keepassxc")
-    (version "2.5.3")
+    (version "2.6.6")
     (source
      (origin
        (method url-fetch)
@@ -127,11 +134,25 @@ human.")
                            "/releases/download/" version "/keepassxc-"
                            version "-src.tar.xz"))
        (sha256
-        (base32 "1sx647mp1xikig50p9bb6vxv18ymdfj3wkxj6qfdr1zfcv7gn005"))))
+        (base32 "1qm4a1k11vy35mrzbzcc7lwlpmjzw18a2zy7z93rqa4vqcdb20rn"))))
     (build-system cmake-build-system)
     (arguments
-     '(#:configure-flags '("-DWITH_XC_ALL=YES"
-                           "-DWITH_XC_UPDATECHECK=NO")))
+     `(#:modules ((guix build cmake-build-system)
+                  (guix build qt-utils)
+                  (guix build utils))
+       #:imported-modules (,@%cmake-build-system-modules
+                            (guix build qt-utils))
+       #:configure-flags '("-DWITH_XC_ALL=YES"
+                           "-DWITH_XC_UPDATECHECK=NO")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-qt
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-qt-program (assoc-ref outputs "out") "keepassxc")
+             #t)))))
+    (native-inputs
+     `(("asciidoctor" ,ruby-asciidoctor)
+       ("qttools" ,qttools)))
     (inputs
      `(("argon2" ,argon2)
        ("libgcrypt" ,libgcrypt)
@@ -140,15 +161,13 @@ human.")
        ("libxi" ,libxi)
        ("libxtst" ,libxtst)
        ("qrencode" ,qrencode)
-       ("qtbase" ,qtbase)
+       ("qtbase" ,qtbase-5)
        ("qtsvg" ,qtsvg)
        ("qtx11extras" ,qtx11extras)
        ("quazip" ,quazip)               ; XC_KEESHARE
        ("readline" ,readline)
        ("yubikey-personalization" ,yubikey-personalization) ; XC_YUBIKEY
        ("zlib" ,zlib)))
-    (native-inputs
-     `(("qttools" ,qttools)))
     (home-page "https://www.keepassxc.org")
     (synopsis "Password manager")
     (description "KeePassXC is a password manager or safe which helps you to
@@ -160,50 +179,19 @@ algorithms AES or Twofish.")
     ;; the combined work falls under the GPLv3.
     (license license:gpl3)))
 
-(define-public keepassx
-  (package
-    (name "keepassx")
-    (version "2.0.3")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://www.keepassx.org/releases/" version
-                           "/keepassx-" version ".tar.gz"))
-       (sha256
-        (base32
-         "1ia7cqx9ias38mnffsl7da7g1f66bcbjsi23k49sln0c6spb9zr3"))))
-    (build-system cmake-build-system)
-    (inputs
-     `(("libgcrypt" ,libgcrypt)
-       ("libxi" ,libxi)
-       ("libxtst" ,libxtst)
-       ("qt" ,qt-4)))
-    (native-inputs
-     `(("zlib" ,zlib)))
-    (home-page "https://www.keepassx.org")
-    (synopsis "Password manager")
-    (description "KeePassX is a password manager or safe which helps you to
-manage your passwords in a secure way.  You can put all your passwords in one
-database, which is locked with one master key or a key-file which can be stored
-on an external storage device.  The databases are encrypted using the
-algorithms AES or Twofish.")
-    ;; Non functional parts use various licences.
-    (license license:gpl3)
-    (properties `((superseded . ,keepassxc)))))
-
 (define-public pwsafe
   (package
     (name "pwsafe")
-    (version "3.50.0")
+    (version "3.54.1")
     (home-page "https://www.pwsafe.org/")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/pwsafe/pwsafe.git")
+             (url "https://github.com/pwsafe/pwsafe")
              (commit version)))
        (sha256
-        (base32 "01kfssd2vr64yh4dqhch58x36n3aj3hpj5n560f41rsxym69c6qs"))
+        (base32 "0d51dlw98mv23nwb0b5jyji8gnb9f5cnig6kivfljl97lmr6lhvf"))
        (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (native-inputs
@@ -213,7 +201,7 @@ algorithms AES or Twofish.")
        ("zip" ,zip)))
     (inputs `(("curl" ,curl)
               ("file" ,file)
-              ("libuuid" ,util-linux)
+              ("libuuid" ,util-linux "lib")
               ("libxt" ,libxt)
               ("libxtst" ,libxtst)
               ("openssl" ,openssl)
@@ -230,15 +218,7 @@ algorithms AES or Twofish.")
                                   (display "find_package(GTest)
 add_subdirectory(src/test)\n" cmake-port)
                                   (close cmake-port)
-                                  #t)))
-                            (add-after 'add-gtest 'patch-executables
-                              (lambda* (#:key inputs #:allow-other-keys)
-                                (chmod "src/test/OSTest.cpp" #o644)
-                                (substitute* "src/os/unix/media.cpp"
-                                  (("/usr/bin/file")
-                                   (string-append (assoc-ref inputs "file")
-                                                  "/bin/file")))
-                                #t)))))
+                                  #t))))))
     (synopsis "Password safe with automatic input and key generation")
     (description "pwsafe is a password manager originally designed by Bruce
 Schneier.  It offers a simple UI to manage passwords for different services.
@@ -246,6 +226,51 @@ There are other programs that support the file format on different
 platforms.")
     (license license:artistic2.0)))
 
+(define-public pwsafe-cli
+  (let ((commit "c49a0541b66647ad04d19ddb351d264054c67759")
+        (revision "0"))
+    (package
+      (name "pwsafe-cli")
+      (version (git-version "0.2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/nsd20463/pwsafe")
+               (commit commit)))
+         (sha256
+          (base32
+           "0ak09r1l7k57m6pdx468hhzvz0szmaq42vyr575fvsjc8rbrp8qq"))
+         (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (arguments
+       ;; FIXME: skip failing test suite (requires write access to /tmp),
+       ;; patching path does not help somehow.
+       `(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (replace 'bootstrap
+             (lambda _
+               (invoke "aclocal")
+               (invoke "autoheader")
+               (invoke "automake" "--add-missing")
+               (invoke "autoconf")
+               #t)))))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)))
+      (inputs
+       `(("libx11" ,libx11)
+         ("libxmu" ,libxmu)
+         ("libxt" ,libxt)
+         ("openssl" ,openssl)))
+      (home-page "https://github.com/nsd20463/pwsafe")
+      (synopsis "CLI password manager")
+      (description
+       "@command{pwsafe} is a command line tool compatible with
+Counterpane's Passwordsafe.")
+      (license license:gpl2+))))
+
 (define-public shroud
   (package
     (name "shroud")
@@ -298,15 +323,19 @@ applications, there is xclip integration." )
 (define-public yapet
   (package
     (name "yapet")
-    (version "2.3")
+    (version "2.5")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
                            version ".tar.xz"))
        (sha256
-        (base32 "1fl4s7v1psl52ndd6i7716i9f493aj8ipl6lgmraadnn5h26l3pm"))))
+        (base32 "0hpibsdry259cmvps35isr6jn9cd9fsk3r1h0ppjx9zxfrpqwldg"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--docdir=" (assoc-ref %outputs "out")
+                            "/share/doc",name "-" ,version))))
     (inputs
      `(("argon2" ,argon2)
        ("ncurses" ,ncurses)
@@ -358,7 +387,7 @@ them out, at the source.")
 (define-public libpwquality
   (package
     (name "libpwquality")
-    (version "1.4.2")
+    (version "1.4.4")
     (source (origin
               (method url-fetch)
               (uri (list
@@ -370,11 +399,20 @@ them out, at the source.")
                                    "libpwquality-" version ".tar.bz2")))
               (sha256
                (base32
-                "13hw532fmzc5xjpy75d74rlfdlxf2a8ibb4hyy9c0s92wsgf0qsj"))))
+                "0id5a8bi8xnjg11g9vzrl2xbpx65mfxclxcvis7zx1v8vhisyfyl"))))
     (build-system gnu-build-system)
     (arguments
-     ;; XXX: have RUNPATH issue.
-     '(#:configure-flags '("--disable-python-bindings")))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'set-LDFLAGS
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (setenv "LDFLAGS"
+                     (string-append
+                      "-Wl,-rpath="
+                      (assoc-ref outputs "out") "/lib"))
+             #t)))))
+    (native-inputs
+     `(("python" ,python-wrapper)))
     (inputs
      `(("cracklib" ,cracklib)))
     (synopsis "Password quality checker")
@@ -449,15 +487,16 @@ any X11 window.")
 (define-public password-store
   (package
     (name "password-store")
-    (version "1.7.3")
+    (version "1.7.4")
     (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://git.zx2c4.com/password-store/snapshot/"
-                              name "-" version ".tar.xz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "git://git.zx2c4.com/password-store")
+                    (commit version)))
               (sha256
                (base32
-                "1x53k5dn3cdmvy8m4fqdld4hji5n676ksl0ql4armkmsds26av1b"))))
+                "17zp9pnb3i9sd2zn9qanngmsywrb7y495ngcqs6313pv3gb83v53"))
+              (file-name (git-file-name name version))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -497,7 +536,7 @@ any X11 window.")
                    (path (map (lambda (pkg)
                                 (string-append (assoc-ref inputs pkg) "/bin"))
                               '("coreutils" "getopt" "git" "gnupg" "qrencode"
-                                "sed" "tree" "which" "xclip"))))
+                                "sed" "tree" "which" "wl-clipboard" "xclip"))))
                (wrap-program (string-append out "/bin/pass")
                  `("PATH" ":" prefix (,(string-join path ":"))))
                #t))))
@@ -512,7 +551,7 @@ any X11 window.")
     (native-search-paths
      (list (search-path-specification
             (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
-            (separator #f)                        ;single entry
+            (separator #f)             ;single entry
             (files '("lib/password-store/extensions")))))
     (inputs
      `(("dmenu" ,dmenu)
@@ -523,6 +562,7 @@ any X11 window.")
        ("sed" ,sed)
        ("tree" ,tree)
        ("which" ,which)
+       ("wl-clipboard" ,wl-clipboard)
        ("xclip" ,xclip)
        ("xdotool" ,xdotool)))
     (home-page "https://www.passwordstore.org/")
@@ -587,20 +627,25 @@ key URIs using the standard otpauth:// scheme.")
 (define-public qtpass
   (package
     (name "qtpass")
-    (version "1.2.3")
+    (version "1.3.2")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/IJHack/QtPass.git")
+             (url "https://github.com/IJHack/QtPass")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1vfhfyccrxq9snyvayqfzm5rqik8ny2gysyv7nipc91kvhq3bhky"))))
+         "0748hjvhjrybi33ci3c8hcr74k9pdrf5jv8npf9hrsrmdyy1kr9x"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build qt-utils)
+                  (guix build utils))
+       #:imported-modules (,@%gnu-build-system-modules
+                            (guix build qt-utils))
+       #:phases
        (modify-phases %standard-phases
          (replace 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
@@ -636,6 +681,10 @@ key URIs using the standard otpauth:// scheme.")
                             (string-append icons "/qtpass-icon.svg"))
                (install-file "qtpass.1" man)
                #t)))
+         (add-after 'install 'wrap-qt
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-qt-program (assoc-ref outputs "out") "qtpass")
+             #t))
          (add-before 'check 'check-setup
            ;; Make Qt render "offscreen", required for tests.
            (lambda _
@@ -644,7 +693,7 @@ key URIs using the standard otpauth:// scheme.")
     (native-inputs
      `(("qttools" ,qttools)))
     (inputs
-     `(("qtbase" ,qtbase)
+     `(("qtbase" ,qtbase-5)
        ("qtsvg" ,qtsvg)))
     (home-page "https://qtpass.org")
     (synopsis "GUI for password manager password-store")
@@ -702,17 +751,17 @@ using password-store through rofi interface:
 (define-public browserpass-native
   (package
     (name "browserpass-native")
-    (version "3.0.6")
+    (version "3.0.7")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://github.com/browserpass/browserpass-native.git")
+             (url "https://github.com/browserpass/browserpass-native")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0q3bsla07zjl6i69nj1axbkg2ia89pvh0jg6nlqgbm2kpzzbn0pz"))))
+         "1jkjslbbac49xjyjkc2b07phdm3i64z40kh6h55cl22dxjmpp1nb"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/browserpass/browserpass-native"
@@ -873,7 +922,7 @@ between hosts and entries in the password store.")
        `(("gmp" ,gmp)
          ("libpcap" ,libpcap)
          ("nss" ,nss)
-         ("openssl" ,openssl-1.0)
+         ("openssl" ,openssl)
          ("python" ,python-2)           ; For "python" and "python2" shebangs
          ("ruby" ,ruby)                 ; For genincstats.rb
          ("zlib" ,zlib)))
@@ -1060,7 +1109,7 @@ your online accounts makes it necessary.")
 (define-public hashcat
   (package
     (name "hashcat")
-    (version "5.1.0")
+    (version "6.1.1")
     (source
      (origin
        (method url-fetch)
@@ -1068,7 +1117,7 @@ your online accounts makes it necessary.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "0f73y4cg8c7a6q7x34qvpfi4g3lw6j9bnn0a13g43aqyiskflfr8"))))
+         "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r"))))
     (native-inputs
      `(("opencl-headers" ,opencl-headers)))
     (build-system gnu-build-system)
@@ -1168,3 +1217,85 @@ exhaustive mode to try every password given a charset or in dictionary mode to
 try every password contained in a file.")
     (home-page "https://github.com/glv2/bruteforce-luks")
     (license license:gpl3+)))
+
+(define-public makepasswd
+  (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
+        (revision "1"))
+    (package
+      (name "makepasswd")
+      (version (git-version "0.5.4" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/khorben/makepasswd")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("libxslt" ,libxslt)
+         ("libxml2" ,libxml2)
+         ("docbook-xsl" ,docbook-xsl)
+         ("docbook-xml" ,docbook-xml)))
+      (inputs
+       `(("openssl" ,openssl)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (delete 'configure))
+         #:make-flags (list "CC=gcc"
+                            (string-append "PREFIX=" (assoc-ref %outputs "out")))
+         #:tests? #f))  ;no tests
+      (synopsis "Generate (pseudo-)random passwords and hashes")
+      (description
+       "Makepasswd is a program that generates pseudo-random passwords of a
+desired length.  It can also generate their corresponding hashes for a given
+encryption algorithm if so desired.")
+      (home-page "https://github.com/khorben/makepasswd")
+      (license license:gpl3))))
+
+(define-public pass-tomb
+  (package
+    (name "pass-tomb")
+    (version "1.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/roddhjav/pass-tomb")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1qj7vx7svk1ljwihj3kv310k17mafnf919n30n4qn1yxmmsvj924"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list (string-append "PREFIX=" out)
+               (string-append "BASHCOMPDIR=" out "/etc/bash_completion.d")))
+       #:test-target "tests"
+       ;; tests are very dependent on system state (swap partition) and require
+       ;; access to /tmp/zsh which is not in the build container.
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'set-tomb-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((tomb (assoc-ref inputs "tomb")))
+               (substitute* "tomb.bash"
+                 ((":-tomb")
+                  (string-append ":-" tomb "/bin/tomb"))))))
+         (delete 'configure))))
+    (inputs
+     `(("tomb" ,tomb)))
+    (home-page "https://github.com/roddhjav/pass-tomb")
+    (synopsis "Pass extension keeping the tree of passwords encrypted")
+    (description "Pass-tomb provides a convenient solution to put your
+password store in a Tomb and then keep your password tree encrypted when you
+are not using it.  It uses the same GPG key to encrypt passwords and tomb,
+therefore you don't need to manage more key or secret.  Moreover, you can ask
+pass-tomb to automatically close your store after a given time.")
+    (license license:gpl3+)))