gnu: Add ruby-asciidoctor-pdf.
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
index 5d389d1..daf4bc3 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2015, 2018 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
@@ -7,13 +7,13 @@
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
-;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
+;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
 ;;; Copyright © 2016 Mike Gerwitz <mtg@gnu.org>
 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
-;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2017, 2020 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
-;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -148,7 +148,10 @@ Daemon and possibly more in the future.")
      ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
      `(#:configure-flags
        (list (string-append "--with-gpg-error-prefix="
-                            (assoc-ref %build-inputs "libgpg-error-host")))))
+                            (assoc-ref %build-inputs "libgpg-error-host"))
+             ;; When cross-compiling, _gcry_mpih_lshift etc are undefined
+             ,@(if (%current-target-system) '("--disable-asm")
+                   '()))))
     (outputs '("out" "debug"))
     (home-page "https://gnupg.org/")
     (synopsis "Cryptographic function library")
@@ -251,14 +254,15 @@ compatible to GNU Pth.")
 (define-public gnupg
   (package
     (name "gnupg")
-    (version "2.2.19")
+    (version "2.2.20")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
                                   ".tar.bz2"))
+              (patches (search-patches "gnupg-default-pinentry.patch"))
               (sha256
                (base32
-                "1h6yx6sdpz3lf9gdppgxqcf73baynr8gflmh43286fkgw3058994"))))
+                "0c6a4v9p6qzhsw1pfcwc459bxpc8hma0w9z8iqb9khvligack9q4"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -404,6 +408,15 @@ libskba (working with X.509 certificates and CMS data).")
       (sha256
        (base32 "0imyjfryvvjdbai454p70zcr95m94j9xnzywrlilqdw2fqi0pqy4"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'disable-failing-test
+           ;; XXX gnupg@2.2.20 breaks the expected JSON response for this test.
+           (lambda _
+             (substitute* "tests/json/t-json.c"
+               (("\"t-keylist-secret\", ") ""))
+             #t)))))
     (native-inputs
      `(("gnupg" ,gnupg)))
     (propagated-inputs
@@ -460,7 +473,7 @@ gpgpme starting with version 1.7.")
 (define-public guile-gcrypt
   (package
     (name "guile-gcrypt")
-    (version "0.2.1")
+    (version "0.3.0")
     (home-page "https://notabug.org/cwebber/guile-gcrypt")
     (source (origin
               (method git-fetch)
@@ -469,7 +482,7 @@ gpgpme starting with version 1.7.")
                     (commit (string-append "v" version))))
               (sha256
                (base32
-                "0n232iyayc46f7hywmjw0jr7pbmmz5h4b04jskhkzz9gxz0ci99c"))
+                "0m29fg4pdfifnqqsa437zc5c1bhbfh62mc69ba25ak4x2cla41ll"))
               (file-name (git-file-name name version))))
     (build-system gnu-build-system)
     (arguments
@@ -491,13 +504,13 @@ gpgpme starting with version 1.7.")
        ("autoconf" ,autoconf)
        ("automake" ,automake)
        ("texinfo" ,texinfo)
-       ("guile" ,guile-2.2)))
+       ("guile" ,guile-3.0)))
     (inputs
-     `(("guile" ,guile-2.2)
+     `(("guile" ,guile-3.0)
        ("libgcrypt" ,libgcrypt)))
     (synopsis "Cryptography library for Guile using Libgcrypt")
     (description
-     "Guile-Gcrypt provides a Guile 2.x interface to a subset of the
+     "Guile-Gcrypt provides a Guile interface to a subset of the
 GNU Libgcrypt crytographic library.  It provides modules for cryptographic
 hash functions, message authentication codes (MAC), public-key cryptography,
 strong randomness, and more.  It is implemented using the foreign function
@@ -514,17 +527,20 @@ interface (FFI) of Guile.")
      `(("guile" ,guile-2.0)
        ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
 
-(define-public guile3.0-gcrypt
+(define-public guile2.2-gcrypt
   (package
     (inherit guile-gcrypt)
-    (name "guile3.0-gcrypt")
+    (name "guile2.2-gcrypt")
     (native-inputs
-     `(("guile" ,guile-next)
+     `(("guile" ,guile-2.2)
        ,@(alist-delete "guile" (package-native-inputs guile-gcrypt))))
     (inputs
-     `(("guile" ,guile-next)
+     `(("guile" ,guile-2.2)
        ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
 
+(define-public guile3.0-gcrypt
+  (deprecated-package "guile3.0-gcrypt" guile-gcrypt))
+
 (define-public python-gpg
   (package
     (name "python-gpg")
@@ -1000,6 +1016,16 @@ however, pgpdump produces more detailed and easier to understand output.")
                (base32
                 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (gnupg (assoc-ref inputs "gnupg")))
+               (wrap-program (string-append out "/bin/gpa")
+                 `("PATH" ":" prefix (,(string-append gnupg "/bin"))))
+               #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs