Subject: [bug#49867] [PATCH 16/29] gnu: Add ocaml-asn1-combinators.

From: pukkamustard <[email-masked]>
Date: Wed, 4 Aug 2021 07:15:32 +0000

* gnu/packages/ocaml.scm (ocaml-asn1-combinators): New variable.
---
 gnu/packages/ocaml.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ab385eb26f..3c8d6fb5df 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7529,6 +7529,41 @@ depends on your system library. Ptime_clock's optional JavaScript support
 depends on @code{js-of-ocaml}.")
     (license license:isc)))
 
+(define-public ocaml-asn1-combinators
+  (package
+    (name "ocaml-asn1-combinators")
+    (version "0.2.5")
+    (home-page "https://github.com/mirleft/ocaml-asn1-combinators")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0n7afzyqc3b7g7rl54ccw31431h6g145zvpzg34q0y4m5gzjv5h5"))))
+    (build-system dune-build-system)
+    (arguments `(#:test-target "."))
+    (propagated-inputs
+     `(("ocaml-cstruct" ,ocaml-cstruct)
+       ("ocaml-zarith" ,ocaml-zarith)
+       ("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
+       ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
+       ("ocaml-ptime" ,ocaml-ptime)))
+    (native-inputs
+     `(("ocaml-alcotest" ,ocaml-alcotest)))
+    (inputs `(("gmp" ,gmp)))
+    (synopsis "OCaml library for embedding typed ASN.1 grammars")
+    (description "@{ocaml-asn1-combinators} is an OCaml library for expressing
+ASN.1 in OCaml.  This allows you to skip the notation part of ASN.1, and embed
+the abstract syntax directly in the language.  These abstract syntax
+representations can be used for parsing, serialization, or random testing.
+
+The only ASN.1 encodings currently supported are BER and DER.")
+    (license license:isc)))
+
 (define-public js-of-ocaml
   (package
     (name "js-of-ocaml")
-- 
2.32.0