gnu: hdf-java: Fix build.
[jackhill/guix/guix.git] / gnu / packages / password-utils.scm
index b965369..ad89cee 100644 (file)
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
@@ -19,8 +19,9 @@
 ;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
 ;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net>
 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
+;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
+;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -42,6 +43,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
@@ -51,7 +53,9 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages file)
   #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-web)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages suckless)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xml)
@@ -100,7 +106,7 @@ human.")
 (define-public keepassxc
   (package
     (name "keepassxc")
-    (version "2.3.3")
+    (version "2.3.4")
     (source
      (origin
        (method url-fetch)
@@ -109,27 +115,17 @@ human.")
                            version "-src.tar.xz"))
        (sha256
         (base32
-         "1m8alsp39vk21zgcvy5zswk0dc1xmajbwnccg7n0lndsi7pqbzyg"))))
+         "02kq0a7a7hpw824n03apma00yq1c6dds224g15mrnnqqjn4af90c"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags '("-DWITH_XC_NETWORKING=YES"
                            "-DWITH_XC_BROWSER=YES"
-                           "-DWITH_XC_SSHAGENT=YES")
-       #:phases
-       (modify-phases %standard-phases
-         ;; should be fixed in 2.3.3+, see:
-         ;; https://github.com/keepassxreboot/keepassxc/pull/1964
-         (add-after 'unpack 'patch-sources
-           (lambda _
-             (substitute* "src/gui/entry/EditEntryWidget.cpp"
-               (("#include <QColorDialog>") "#include <QColorDialog>
-#include <QButtonGroup>"))
-             #t)))))
+                           "-DWITH_XC_SSHAGENT=YES")))
     (inputs
      `(("argon2" ,argon2)
-       ("curl" ,curl) ; XC_NETWORKING
+       ("curl" ,curl)                   ; XC_NETWORKING
        ("libgcrypt" ,libgcrypt)
-       ("libsodium" ,libsodium) ; XC_BROWSER
+       ("libsodium" ,libsodium)         ; XC_BROWSER
        ("libxi" ,libxi)
        ("libxtst" ,libxtst)
        ("qtbase" ,qtbase)
@@ -144,7 +140,7 @@ 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.
+    ;; Non-functional parts use various licences.
     (license license:gpl3)))
 
 (define-public keepassx
@@ -178,6 +174,59 @@ algorithms AES or Twofish.")
     (license license:gpl3)
     (properties `((superseded . ,keepassxc)))))
 
+(define-public pwsafe
+  (package
+    (name "pwsafe")
+    (version "3.48.0")
+    (home-page "https://www.pwsafe.org/" )
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pwsafe/pwsafe.git")
+             (commit version)))
+       (sha256 (base32 "0hxv23yh76liggxbjn4m132z15sklra8ms341xgzl4n5vjx30ihi"))
+       (file-name (string-append name "-" version "-checkout"))))
+    (build-system cmake-build-system)
+    (native-inputs `(("gettext" ,gettext-minimal)
+                     ("perl" ,perl)
+                     ("zip" ,zip)))
+    (inputs `(("curl" ,curl)
+              ("file" ,file)
+              ("gtest" ,googletest)
+              ("libuuid" ,util-linux)
+              ("libxt" ,libxt)
+              ("libxtst" ,libxtst)
+              ("openssl" ,openssl)
+              ("qrencode" ,qrencode)
+              ("wxwidgets" ,wxwidgets)
+              ("xerces-c" ,xerces-c)))
+    (arguments '(#:configure-flags (list "-DNO_GTEST=YES")
+                 #:phases (modify-phases %standard-phases
+                            (add-after 'unpack 'add-gtest
+                              (lambda* (#:key inputs #:allow-other-keys)
+                                (chmod "CMakeLists.txt" #o644)
+                                (let ((cmake-port (open-file "CMakeLists.txt"
+                                                             "a")))
+                                  (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)))))
+    (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.
+There are other programs that support the file format on different
+platforms.")
+    (license license:artistic2.0)))
+
 (define-public shroud
   (package
     (name "shroud")
@@ -246,17 +295,15 @@ and vice versa.")
 (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"))
-              (patches (search-patches "cracklib-CVE-2016-6318.patch"
-                                       "cracklib-fix-buffer-overflow.patch"))
-              (sha256
-               (base32
-                "0hrkb0prf7n92w6rxgq0ilzkk6rkhpys2cfqkrbzswp27na7dkqp"))))
+    (version "2.9.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/cracklib/cracklib/"
+                           "releases/download/v" version "/"
+                           "cracklib-" version ".tar.bz2"))
+       (sha256
+        (base32 "1rimpjsdnmw8f5b7k558cic41p2qy2n2yrlqp5vh7mp4162hk0py"))))
     (build-system gnu-build-system)
     (synopsis "Password checking library")
     (home-page "https://github.com/cracklib/cracklib")
@@ -332,15 +379,14 @@ random passwords that pass the checks.")
                #t)))
          (add-after 'install 'manpage
            (lambda* (#:key outputs #:allow-other-keys)
-             (and
-              ;; Without this substitution, it fails with
-              ;; ImportError: No module named 'gpg'
-              (substitute* "Makefile"
-                (("PYTHONPATH=.") ""))
-              (zero? (system* "make" "assword.1"))
-              (install-file
-               "assword.1"
-               (string-append (assoc-ref outputs "out") "/share/man/man1"))))))))
+             ;; Without this substitution, it fails with
+             ;; ImportError: No module named 'gpg'
+             (substitute* "Makefile"
+               (("PYTHONPATH=.") ""))
+             (invoke "make" "assword.1")
+             (install-file
+              "assword.1"
+              (string-append (assoc-ref outputs "out") "/share/man/man1")))))))
     (build-system python-build-system)
     (native-inputs
      `(("txt2man" ,txt2man)))
@@ -715,7 +761,7 @@ your online accounts makes it necessary.")
 (define-public hashcat
   (package
     (name "hashcat")
-    (version "4.1.0")
+    (version "5.1.0")
     (source
      (origin
        (method url-fetch)
@@ -723,7 +769,7 @@ your online accounts makes it necessary.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "170i2y32ykgzb1qf1wz3klwn31c09bviz4x3bnrwia65adqrj8xx"))))
+         "0f73y4cg8c7a6q7x34qvpfi4g3lw6j9bnn0a13g43aqyiskflfr8"))))
     (native-inputs
      `(("opencl-headers" ,opencl-headers)))
     (build-system gnu-build-system)
@@ -745,15 +791,15 @@ password cracking.")
 (define-public hashcat-utils
   (package
     (name "hashcat-utils")
-    (version "1.8")
+    (version "1.9")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/download/v"
-                           version "/hashcat-utils-1.8.7z"))
+       (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
+                           "download/v" version "/"
+                           "hashcat-utils-" version ".7z"))
        (sha256
-        (base32
-         "1x80rngjz7gkhwplhw1iqr0wzb6hjkrjfld2kz9kmgp5dr9nys1p"))))
+        (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
     (native-inputs
      `(("p7zip" ,p7zip)))
     (inputs
@@ -777,12 +823,16 @@ password cracking.")
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (string-append (assoc-ref outputs "out") "/bin")))
                (mkdir-p out)
-               (for-each (lambda (file)
-                           (copy-file file (string-append out "/" (basename file ".bin"))))
-                         (find-files "." "\\.bin$"))
-               (for-each (lambda (file)
-                           (copy-file file (string-append out "/" (basename file ".pl"))))
-                         (find-files "../bin" "\\.pl$"))
+               (for-each
+                (lambda (file)
+                  (copy-file file (string-append out "/"
+                                                 (basename file ".bin"))))
+                (find-files "." "\\.bin$"))
+               (for-each
+                (lambda (file)
+                  (copy-file file (string-append out "/"
+                                                 (basename file ".pl"))))
+                (find-files "../bin" "\\.pl$"))
                #t))))))
     (home-page "https://github.com/hashcat/hashcat-utils/")
     (synopsis "Small utilities that are useful in advanced password cracking")