Subject: [bug#71076] [PATCH 46/81] gnu: Add rust-rcgen-0.13.

From: Herman Rimm <[email-masked]>
Date: Mon, 20 May 2024 10:58:51 +0200

* gnu/packages/crates-tls.scm (rust-rcgen-0.13): Add variable.
(rust-rcgen-0.12): Inherit from rust-rcgen-0.13.

Change-Id: I340df02301dd0bfbd3badc2cd38779216492b0d9
---
 gnu/packages/crates-tls.scm | 54 ++++++++++++++++++++++++++++++-------
 1 file changed, 44 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm
index 9cc93ccad4..382a162dad 100644
--- a/gnu/packages/crates-tls.scm
+++ b/gnu/packages/crates-tls.scm
@@ -935,8 +935,51 @@ (define-public rust-oid-registry-0.2
      `(#:skip-build? #t
        #:cargo-inputs (("rust-der-parser" ,rust-der-parser-6))))))
 
+(define-public rust-rcgen-0.13
+  (package
+    (name "rust-rcgen")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "rcgen" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0yb7lg0pd1j66jr0kacs5z8q66fb9izkvsp11ma8hry4f8c7w1sl"))
+       (modules '((guix build utils)))
+       ;; Don't use a vendored botan.
+       (snippet '(substitute* "Cargo.toml"
+                   ((".*vendored.*") "")))))
+    (build-system cargo-build-system)
+    (arguments
+     (list
+      #:cargo-inputs (list rust-aws-lc-rs-1
+                           rust-pem-3
+                           rust-ring-0.17
+                           rust-rustls-pki-types-1
+                           rust-time-0.3
+                           rust-x509-parser-0.16
+                           rust-yasna-0.5
+                           rust-zeroize-1)
+      #:cargo-development-inputs (list rust-botan-0.10
+                                       rust-openssl-0.10
+                                       rust-rand-0.8
+                                       rust-ring-0.17
+                                       rust-rsa-0.9
+                                       rust-rustls-pki-types-1
+                                       rust-rustls-webpki-0.102
+                                       rust-x509-parser-0.16)))
+    (native-inputs (list pkg-config))
+    (inputs (list botan openssl))
+    (home-page "https://github.com/rustls/rcgen")
+    (synopsis "Rust X.509 certificate generator")
+    (description
+      "This package provides Rust X.509 certificate generator.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-rcgen-0.12
   (package
+    (inherit rust-rcgen-0.13)
     (name "rust-rcgen")
     (version "0.12.1")
     (source (origin
@@ -952,7 +995,6 @@ (define-public rust-rcgen-0.12
                   ;; Don't use a vendored botan.
                   (substitute* "Cargo.toml"
                     ((".*vendored.*") ""))))))
-    (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
        (("rust-aws-lc-rs" ,rust-aws-lc-rs-1)
@@ -969,15 +1011,7 @@ (define-public rust-rcgen-0.12
         ("rust-ring" ,rust-ring-0.17)
         ("rust-rsa" ,rust-rsa-0.9)
         ("rust-rustls-webpki" ,rust-rustls-webpki-0.101)
-        ("rust-x509-parser" ,rust-x509-parser-0.15))))
-    (native-inputs
-     (list pkg-config))
-    (inputs
-     (list botan openssl))
-    (home-page "https://github.com/rustls/rcgen")
-    (synopsis "Rust X.509 certificate generator")
-    (description "Rust X.509 certificate generator.")
-    (license (list license:expat license:asl2.0))))
+        ("rust-x509-parser" ,rust-x509-parser-0.15))))))
 
 (define-public rust-rcgen-0.11
   (package
-- 
2.41.0