Subject: [bug#71076] [PATCH 39/81] gnu: Add rust-der-parser-9.

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

* gnu/packages/crates-tls.scm (rust-der-parser-9): Add variable.
(rust-der-parser-8): Inherit from rust-der-parser-9.

Change-Id: I9ad041ecb124db069ebf2025293b4fd00cd5dadf
---
 gnu/packages/crates-tls.scm | 43 ++++++++++++++++++++++++++++++-------
 1 file changed, 35 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm
index 2694da4c48..105f692a08 100644
--- a/gnu/packages/crates-tls.scm
+++ b/gnu/packages/crates-tls.scm
@@ -631,8 +631,42 @@ (define-public rust-der-oid-macro-0.5
      "This crate provides a macro to encode DER oids at compile time.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-der-parser-9
+  (package
+    (name "rust-der-parser")
+    (version "9.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "der-parser" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+          "0lxmykajggvaq5mvpm2avgzwib4n9nyxii0kqaz2d5k88g3abl2w"))))
+    (build-system cargo-build-system)
+    (arguments
+     (list
+      #:cargo-inputs (list rust-asn1-rs-0.6
+                           rust-cookie-factory-0.3
+                           rust-displaydoc-0.2
+                           rust-nom-7
+                           rust-num-bigint-0.4
+                           rust-num-traits-0.2
+                           rust-rusticata-macros-4)
+      #:cargo-development-inputs (list rust-hex-literal-0.4
+                                       rust-pretty-assertions-1
+                                       rust-test-case-3)))
+    (home-page "https://github.com/rusticata/der-parser")
+    (synopsis "BER/DER parser written in pure Rust")
+    (description
+      "This crate provides a parser for Basic Encoding Rules (BER
+[X.690]) and Distinguished Encoding Rules (DER [X.690]), implemented
+with the @code{nom} parser combinator framework.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-der-parser-8
   (package
+    (inherit rust-der-parser-9)
     (name "rust-der-parser")
     (version "8.2.0")
     (source (origin
@@ -642,7 +676,6 @@ (define-public rust-der-parser-8
               (sha256
                (base32
                 "07mnz9y395zyxwj7nam2dbzkqdngfraxp2i7y2714dxmpbxpdmnv"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
        (("rust-asn1-rs" ,rust-asn1-rs-0.5)
@@ -655,13 +688,7 @@ (define-public rust-der-parser-8
        #:cargo-development-inputs
        (("rust-hex-literal" ,rust-hex-literal-0.3)
         ("rust-pretty-assertions" ,rust-pretty-assertions-1)
-        ("rust-test-case" ,rust-test-case-3))))
-    (home-page "https://github.com/rusticata/der-parser")
-    (synopsis "BER/DER parser written in pure Rust")
-    (description "This crate provides a parser for Basic Encoding Rules (BER
-[X.690]) and Distinguished Encoding Rules(DER [X.690]), implemented with the
-@code{nom} parser combinator framework.")
-    (license (list license:expat license:asl2.0))))
+        ("rust-test-case" ,rust-test-case-3))))))
 
 (define-public rust-der-parser-7
   (package
-- 
2.41.0