Subject: [bug#71076] [PATCH 44/81] gnu: Add rust-x509-parser-0.16.

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

* gnu/packages/crates-tls.scm (rust-x509-parser-0.16): Add variable.
(rust-x509-parser-0.15): Inherit from rust-x509-parser-0.16.

Change-Id: I516d1cb1a6e79a38e26177ca7b011c80bd6fcf01
---
 gnu/packages/crates-tls.scm | 40 ++++++++++++++++++++++++++++++-------
 1 file changed, 33 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm
index addba26f3a..b90e11b9a1 100644
--- a/gnu/packages/crates-tls.scm
+++ b/gnu/packages/crates-tls.scm
@@ -1805,8 +1805,40 @@ (define-public rust-x509-cert-0.2
 Public Key Infrastructure Certificate format as described in RFC 5280.")
     (license (list license:asl2.0 license:expat))))
 
+(define-public rust-x509-parser-0.16
+  (package
+    (name "rust-x509-parser")
+    (version "0.16.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "x509-parser" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0s8zyl6fafkzpylcpcn08bmcmrzzcb6gfjx2h8zny3bh60pidg7w"))))
+    (build-system cargo-build-system)
+    (arguments
+     (list #:tests? #f ;missing files
+           #:cargo-inputs (list rust-asn1-rs-0.6
+                                rust-data-encoding-2
+                                rust-der-parser-9
+                                rust-lazy-static-1
+                                rust-nom-7
+                                rust-oid-registry-0.7
+                                rust-ring-0.17
+                                rust-rusticata-macros-4
+                                rust-thiserror-1
+                                rust-time-0.3)))
+    (home-page "https://github.com/rusticata/x509-parser")
+    (synopsis "X.509 parser written in pure Rust")
+    (description
+     "This package provides Parser for the X.509 v3 format (RFC 5280
+certificates).")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-x509-parser-0.15
   (package
+    (inherit rust-x509-parser-0.16)
     (name "rust-x509-parser")
     (version "0.15.1")
     (source (origin
@@ -1816,7 +1848,6 @@ (define-public rust-x509-parser-0.15
               (sha256
                (base32
                 "1nk3ryam7yzsza735xdypkv1i4c35gqlygax5jyr74bbnsjznsbh"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
        (("rust-asn1-rs" ,rust-asn1-rs-0.5)
@@ -1828,12 +1859,7 @@ (define-public rust-x509-parser-0.15
         ("rust-ring" ,rust-ring-0.16)
         ("rust-rusticata-macros" ,rust-rusticata-macros-4)
         ("rust-thiserror" ,rust-thiserror-1)
-        ("rust-time" ,rust-time-0.3))))
-    (home-page "https://github.com/rusticata/x509-parser")
-    (synopsis "X.509 parser written in pure Rust")
-    (description "This crate provides a parser for the X.509 v3 format (RFC
-5280 certificates).")
-    (license (list license:expat license:asl2.0))))
+        ("rust-time" ,rust-time-0.3))))))
 
 (define-public rust-x509-parser-0.14
   (package
-- 
2.41.0