gnu: Add python-pyshp.
[jackhill/guix/guix.git] / gnu / packages / password-utils.scm
index 2053457..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>
@@ -12,7 +12,7 @@
 ;;; 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, 2020 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>
@@ -29,6 +29,8 @@
 ;;; 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.
 ;;;
@@ -58,6 +60,7 @@
   #: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)
@@ -123,7 +126,7 @@ human.")
 (define-public keepassxc
   (package
     (name "keepassxc")
-    (version "2.6.3")
+    (version "2.6.6")
     (source
      (origin
        (method url-fetch)
@@ -131,22 +134,21 @@ human.")
                            "/releases/download/" version "/keepassxc-"
                            version "-src.tar.xz"))
        (sha256
-        (base32 "1lgp20597dzj8qn8a71x3a6b549rvqybqx4haywwb09qiznvdq77"))))
+        (base32 "1qm4a1k11vy35mrzbzcc7lwlpmjzw18a2zy7z93rqa4vqcdb20rn"))))
     (build-system cmake-build-system)
     (arguments
-     '(#:configure-flags '("-DWITH_XC_ALL=YES"
+     `(#: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-bin
-           (lambda* (#:key outputs inputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (wrap-program (string-append out "/bin/keepassxc")
-                 `("QT_PLUGIN_PATH" ":" prefix
-                   ,(map (lambda (label)
-                           (string-append (assoc-ref inputs label)
-                                          "/lib/qt5/plugins"))
-                         '("qtbase" "qtsvg")))))
+         (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)
@@ -159,7 +161,7 @@ human.")
        ("libxi" ,libxi)
        ("libxtst" ,libxtst)
        ("qrencode" ,qrencode)
-       ("qtbase" ,qtbase)
+       ("qtbase" ,qtbase-5)
        ("qtsvg" ,qtsvg)
        ("qtx11extras" ,qtx11extras)
        ("quazip" ,quazip)               ; XC_KEESHARE
@@ -177,37 +179,6 @@ 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")
@@ -255,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")
@@ -471,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
@@ -519,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))))
@@ -534,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)
@@ -545,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/")
@@ -675,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")