[PATCH 00/29] gnu: Add ocaml-cohttp-lwt-unix.

  • Done
  • quality assurance status badge
Details
3 participants
  • Julien Lepiller
  • Xinglu Chen
  • pukkamustard
Owner
unassigned
Submitted by
pukkamustard
Severity
normal
P
P
pukkamustard wrote on 4 Aug 2021 09:10
(address . guix-patches@gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071015.20848-1-pukkamustard@posteo.net
Hi,

These patches add ocaml-cohttp-lwt-unix - an OCaml HTTP library - and dependencies.

Some known rough edges:

- ocaml-eqaf: Tests are disabled for now as I am not able to build ocaml-afl-persistent which is a dependency for ocaml-crowbar which is required to run ocaml-eqaf tests. There is ongoing work to port ocaml-afl-persistent to dune (https://github.com/stedolan/ocaml-afl-persistent/pull/7)with that it should be much easier to build it and enable tests for ocaml-eqaf.
- ocaml-mirage-crypto-ec: Contains generated code from Fiat-Crypto (https://github.com/mit-plv/fiat-crypto).It would be nicer to generate the C code from the Coq sources during Guix build, but that seems like a lot more work.
- ocaml-ca-certs: Tests requie access to `/etc/ssl/certs/*` which does not seem to be available during tests. Any ways to allow this in the test environment?
- ocaml-cohttp-lwt-unix: Seems to require network during tests. Can someone confirm this?

Thanks,
pukkamustard


pukkamustard (29):
gnu: Add ocaml-cohttp-lwt.
gnu: Add ocaml-domain-name.
gnu: Add ocaml-macaddr.
gnu: Add ocaml-ipaddr.
gnu: Add ocaml-ipaddr-cstruct.
gnu: Add ocaml-ipaddr-sexp.
gnu: Add ocaml-conduit.
gnu: Add ocaml-conduit-lwt.
gnu: Add ocaml-eqaf.
gnu: Add ocaml-mirage-crypto.
gnu: Add ocaml-duration.
gnu: Add ocaml-randomconv.
gnu: Add ocaml-mirage-crypto-rng.
gnu: Add ocaml-mirage-crypto-pk.
gnu: Add ocaml-ptime.
gnu: Add ocaml-asn1-combinators.
gnu: Add ocaml-ppx-deriving.
gnu: Add ocaml-ppx-deriving-yojson.
gnu: Add ocaml-mirage-crypto-ec.
gnu: Add ocaml-gmap.
gnu: Add ocaml-pbkdf.
gnu: Add ocaml-cstruct-unix.
gnu: Add ocaml-x509.
gnu: Add ocaml-ca-certs.
gnu: Add ocaml-lwt-log.
gnu: Add ocaml-lwt-ssl.
gnu: Add ocaml-conduit-lwt-unix.
gnu: Add ocaml-magic-mime.
gnu: Add ocaml-cohttp-lwt-unix

gnu/packages/ocaml.scm | 787 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 786 insertions(+), 1 deletion(-)

--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 01/29] gnu: Add ocaml-cohttp-lwt.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-1-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-cohttp-lwt): New variable.
---
gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bf9242410d..a33ae85c3a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7148,6 +7148,30 @@ HTTP parser, and implementations using various asynchronous programming
libraries.")
(license license:isc)))
+(define-public ocaml-cohttp-lwt
+ (package
+ (inherit ocaml-cohttp)
+ (name "ocaml-cohttp-lwt")
+ (arguments `(#:package "cohttp-lwt"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cohttp" ,ocaml-cohttp)
+ ("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-sexplib0" ,ocaml-sexplib0)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-uri" ,ocaml-uri)))
+ (synopsis "OCaml library for HTTP clients and servers using the Lwt
+concurrency library")
+ (description "This is a portable implementation of HTTP that uses the Lwt
+concurrency library to multiplex IO. It implements as much of the logic in an
+OS-independent way as possible, so that more specialised modules can be
+tailored for different targets. For example, you can install
+@code{ocaml-cohttp-lwt-unix} or @code{ocaml-cohttp-lwt-jsoo} for a Unix or
+JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
+version of the library. All of these implementations share the same IO logic
+from this module.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 02/29] gnu: Add ocaml-domain-name.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-2-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-domain-name): New variable.
---
gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a33ae85c3a..7acc3bcf6d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7172,6 +7172,35 @@ JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
version of the library. All of these implementations share the same IO logic
from this module.")))
+(define-public ocaml-domain-name
+ (package
+ (name "ocaml-domain-name")
+ (version "0.3.0")
+ (home-page "https://github.com/hannesm/domain-name")
+ (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
+ "06l82k27wa446k0sd799i73rrqwwmqfm542blkx6bbm2xpxaz2cm"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-fmt" ,ocaml-fmt)
+ ("ocaml-astring" ,ocaml-astring)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)))
+ (synopsis "OCaml library for RFC 1035 Internet domain names")
+ (description "This OCaml library provides functions for working with
+Internet domain names (RFC 1035). For example, it provides functions for
+comparing domain names or checking if one domain name is a sub-domain of
+another.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 04/29] gnu: Add ocaml-ipaddr.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-4-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ipaddr): New variable.
---
gnu/packages/ocaml.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 46adb95b93..08c45f46a7 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7229,6 +7229,25 @@ another.")
address representations.")
(license license:isc)))
+(define-public ocaml-ipaddr
+ (package
+ (inherit ocaml-macaddr)
+ (name "ocaml-ipaddr")
+ (arguments `(#:package "ipaddr"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-macaddr" ,ocaml-macaddr)
+ ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
+ ("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-domain-name" ,ocaml-domain-name)))
+ (native-inputs
+ `(("ocaml-ounit" ,ocaml-ounit)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)))
+ (synopsis "OCaml library for manipulation of IP address representations")
+ (description "This OCaml library provides functions for manipulating IP
+address representations. It supports IPv4 and IPv6.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 06/29] gnu: Add ocaml-ipaddr-sexp.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-6-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ipaddr-sexp): New variable.
---
gnu/packages/ocaml.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 668299e89c..7e3abcacb1 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7261,6 +7261,23 @@ address representations. It supports IPv4 and IPv6.")
(description "This OCaml library provides functions for manipulating as
C-like structures using the @code{ocaml-cstruct} library.")))
+(define-public ocaml-ipaddr-sexp
+ (package
+ (inherit ocaml-macaddr)
+ (name "ocaml-ipaddr-sexp")
+ (arguments `(#:package "ipaddr-sexp"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ipaddr" ,ocaml-ipaddr)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-sexplib0" ,ocaml-sexplib0)))
+ (native-inputs
+ `(("ocaml-ipaddr-cstruct" ,ocaml-ipaddr-cstruct)
+ ("ocaml-ounit" ,ocaml-ounit)))
+ (synopsis "OCaml library for manipulation of IP addresses as S-expressions")
+ (description "This OCaml library provides functions for manipulating as
+S-expressions using the @code{ocaml-sexp} library.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 05/29] gnu: Add ocaml-ipaddr-cstruct.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-5-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ipaddr-cstruct): New variable.
---
gnu/packages/ocaml.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 08c45f46a7..668299e89c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7248,6 +7248,19 @@ address representations.")
address representations. It supports IPv4 and IPv6.")
(license license:isc)))
+(define-public ocaml-ipaddr-cstruct
+ (package
+ (inherit ocaml-macaddr)
+ (name "ocaml-ipaddr-cstruct")
+ (arguments `(#:package "ipaddr-cstruct"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ipaddr" ,ocaml-ipaddr)
+ ("ocaml-cstruct" ,ocaml-cstruct)))
+ (synopsis "OCaml library for manipulation of IP addresses as C-like structres")
+ (description "This OCaml library provides functions for manipulating as
+C-like structures using the @code{ocaml-cstruct} library.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 03/29] gnu: Add ocaml-macaddr.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-3-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-macaddr): New variable.
---
gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7acc3bcf6d..46adb95b93 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7201,6 +7201,34 @@ comparing domain names or checking if one domain name is a sub-domain of
another.")
(license license:isc)))
+(define-public ocaml-macaddr
+ (package
+ (name "ocaml-macaddr")
+ (version "5.1.0")
+ (home-page "https://github.com/mirage/ocaml-ipaddr")
+ (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
+ "02pan5b8s4j5r68znjdb5mln3nffccdfsh4rw71x31b6qsrlqzgg"))))
+ (build-system dune-build-system)
+ (arguments `(#:package "macaddr"
+ #:test-target "."))
+ (native-inputs
+ `(("ocaml-ounit" ,ocaml-ounit)
+ ("ocaml-domain-name" ,ocaml-domain-name)
+ ("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)))
+ (synopsis "OCaml library for manipulation of MAC address representations")
+ (description "This OCaml library provides functions for manipulating MAC
+address representations.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 09/29] gnu: Add ocaml-eqaf.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-9-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-eqaf): New variable.
---
gnu/packages/ocaml.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c29a272214..04240b560b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7328,6 +7328,39 @@ establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
@code{ocaml-lwt}.")
(license license:isc)))
+(define-public ocaml-eqaf
+ (package
+ (name "ocaml-eqaf")
+ (version "0.7")
+ (home-page "https://github.com/mirage/eqaf")
+ (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
+ "06hsnnjax1kb3qsi3cj0nyyz8c2hj2gbw3h517gpjinpnwy2fr85"))))
+ (build-system dune-build-system)
+ (arguments
+ ;; Tests require ocaml-crowbar which depends on
+ ;; ocaml-afl-persistent. ocaml-afl-persistent uses a non-standard build system
+ ;; and I have not yet managed to build it with Guix. There is an on-going effort
+ ;; to port the build system to dune
+ ;; (https://github.com/stedolan/ocaml-afl-persistent/pull/7). With that it should
+ ;; be easy to add ocaml-afl-persistent and ocaml-crowbar and enable these tests.
+ `(#:tests? #f))
+ (propagated-inputs
+ ;; required to build the eqaf.cstruct library (see https://github.com/mirage/eqaf/pull/27)
+ `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
+ ("ocaml-cstruct" ,ocaml-cstruct)))
+ (synopsis "OCaml library for constant-time equal function on string")
+ (description "This OCaml library provides an equal function on string in
+constant-time to avoid timing-attack with crypto stuff.")
+ (license license:expat)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 13/29] gnu: Add ocaml-mirage-crypto-rng.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-13-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-mirage-crypto-rng): New variable.
---
gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f7956fe216..6af9bedc65 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7442,6 +7442,26 @@ between various time units.")
as (C-like structures using @code{ocaml-cstruct}) to OCaml native numbers.")
(license license:isc)))
+(define-public ocaml-mirage-crypto-rng
+ (package
+ (inherit ocaml-mirage-crypto)
+ (name "ocaml-mirage-crypto-rng")
+ (arguments `(#:package "mirage-crypto-rng"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-duration" ,ocaml-duration)
+ ("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
+ ("ocaml-mtime" ,ocaml-mtime)
+ ("ocaml-lwt" ,ocaml-lwt)))
+ (native-inputs
+ `(("ocaml-ounit" ,ocaml-ounit)
+ ("ocaml-randomconv" ,ocaml-randomconv)))
+ (synopsis "OCaml library providing a cryptographically secure pseudorandom number generator")
+ (description "@code{ocaml-mirage-crypto-rng} provides an OCaml random
+number generator interface, and implementations.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 07/29] gnu: Add ocaml-conduit.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-7-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-conduit): New variable.
---
gnu/packages/ocaml.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7e3abcacb1..f5723bdf09 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7278,6 +7278,38 @@ C-like structures using the @code{ocaml-cstruct} library.")))
(description "This OCaml library provides functions for manipulating as
S-expressions using the @code{ocaml-sexp} library.")))
+(define-public ocaml-conduit
+ (package
+ (name "ocaml-conduit")
+ (version "4.0.0")
+ (home-page "https://github.com/mirage/ocaml-conduit")
+ (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
+ "0ipm6fkmvgsyfj5f5p057av8kykli5rh8qzw7ycdrakdk7gzvhi0"))))
+ (build-system dune-build-system)
+ (arguments `(#:package "conduit"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-sexplib" ,ocaml-sexplib)
+ ("ocaml-astring" ,ocaml-astring)
+ ("ocaml-uri" ,ocaml-uri)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-ipaddr" ,ocaml-ipaddr)
+ ("ocaml-ipaddr-sexp" ,ocaml-ipaddr-sexp)))
+ (synopsis "OCaml library for establishing TCP and SSL/TLS connections")
+ (description "This OCaml library provides an abstraction for establishing
+TCP and SSL/TLS connections. This allows using the same type signatures
+regardless of the SSL library or platform being used.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 08/29] gnu: Add ocaml-conduit-lwt.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-8-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-conduit-lwt): New variable.
---
gnu/packages/ocaml.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f5723bdf09..c29a272214 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7310,6 +7310,24 @@ TCP and SSL/TLS connections. This allows using the same type signatures
regardless of the SSL library or platform being used.")
(license license:isc)))
+(define-public ocaml-conduit-lwt
+ (package
+ (inherit ocaml-conduit)
+ (name "ocaml-conduit-lwt")
+ (arguments `(#:package "conduit-lwt"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-sexplib" ,ocaml-sexplib)
+ ("ocaml-conduit" ,ocaml-conduit)
+ ("ocaml-lwt" ,ocaml-lwt)))
+ (synopsis "OCaml library for establishing TCP and SSL/TLS connections
+using Lwt")
+ (description "This OCaml library provides the abstractions for
+establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
+@code{ocaml-lwt}.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 17/29] gnu: Add ocaml-ppx-deriving.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-17-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ppx-deriving): New variable.
---
gnu/packages/ocaml.scm | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3c8d6fb5df..f385aa2a94 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4528,7 +4528,38 @@ speedup, polymorphic variants and optional syntax for tuples and variants.
yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
serializers and deserializers from type definitions.")
(license license:bsd-3)))
-
+
+(define-public ocaml-ppx-deriving
+ (package
+ (name "ocaml-ppx-deriving")
+ (version "5.2.1")
+ (home-page "https://github.com/ocaml-ppx/ppx_deriving")
+ (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
+ "1wqcnw4wi6pfjjhixpakckm03dpj990259za432804471a6spm2j"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
+ ("ocaml-ppxlib" ,ocaml-ppxlib)
+ ("ocaml-result" ,ocaml-result)))
+ (native-inputs
+ `(("ocaml-cppo" ,ocaml-cppo)
+ ("ocaml-ounit2" ,ocaml-ounit2)))
+ (properties `((upstream-name . "ppx_deriving")))
+ (synopsis "Type-driven code generation for OCaml")
+ (description "This OCaml library provides common infrastructure for
+generating code based on type definitions, and a set of useful plugins for
+common tasks.")
+ (license license:expat)))
+
(define-public ocaml-craml
(package
(name "ocaml-craml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 10/29] gnu: Add ocaml-mirage-crypto.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-10-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-mirage-crypto): New variable.
---
gnu/packages/ocaml.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 04240b560b..aa1129e5f3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7361,6 +7361,37 @@ establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
constant-time to avoid timing-attack with crypto stuff.")
(license license:expat)))
+(define-public ocaml-mirage-crypto
+ (package
+ (name "ocaml-mirage-crypto")
+ (version "0.10.3")
+ (home-page "https://github.com/mirage/mirage-crypto")
+ (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
+ "0j7x07c8xy8bmqp9ad1cib6j69dy7acjg9m1d7pn0dnmbkrl8fiz"))))
+ (build-system dune-build-system)
+ (arguments `(#:package "mirage-crypto"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-eqaf" ,ocaml-eqaf)
+ ("ocaml-bigarray-compat" ,ocaml-bigarray-compat)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("ocaml-ounit" ,ocaml-ounit)))
+ (synopsis "OCaml library provding cryptographic primitives")
+ (description "This OCaml library provides symmetric ciphers (DES, AES,
+RC4, ChaCha20/Poly1305), and hashes (MD5, SHA-1, SHA-2). This library can be
+used from MirageOS unikernels.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 21/29] gnu: Add ocaml-pbkdf.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-21-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-pbkdf): New variable.
---
gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e520151adf..6effe1ff12 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7684,6 +7684,32 @@ Algebraic Data Type")
to create a type-safe heterogenous maps.")
(license license:isc)))
+(define-public ocaml-pbkdf
+ (package
+ (name "ocaml-pbkdf")
+ (version "1.1.0")
+ (home-page "https://github.com/abeaumont/ocaml-pbkdf")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0scq1i7hiy8dgjdfrcaca3k7wzys35k1g2cdg7v4kfdqr6q1scb3"))))
+ (build-system dune-build-system)
+ (propagated-inputs
+ `(("ocaml-mirage-crypto" ,ocaml-mirage-crypto)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)))
+ (synopsis "OCaml library for password based key derivation functions
+(PBKDF) from PKCS#5")
+ (description "An OCaml implementation of PBKDF 1 and 2 as defined by
+PKCS#5 using @code{ocaml-mirage-crypto}.")
+ (license license:bsd-2)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 11/29] gnu: Add ocaml-duration.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-11-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-duration): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index aa1129e5f3..11458d0039 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7392,6 +7392,31 @@ RC4, ChaCha20/Poly1305), and hashes (MD5, SHA-1, SHA-2). This library can be
used from MirageOS unikernels.")
(license license:isc)))
+(define-public ocaml-duration
+ (package
+ (name "ocaml-duration")
+ (version "0.1.3")
+ (home-page "https://github.com/hannesm/duration")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ka4cv9581iaa6q1k02ddrpz7f53k3wk7rpq43j1lrdm4vl2jk4w"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)))
+ (synopsis "OCaml library providing conversions between various time units")
+ (description "This OCaml library provides functions for representing a
+time duration as an usigned 64 bit integer. This can be used for conversions
+between various time units.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 14/29] gnu: Add ocaml-mirage-crypto-pk.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-14-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-mirage-crypto-pk): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6af9bedc65..a34c844059 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7462,6 +7462,31 @@ as (C-like structures using @code{ocaml-cstruct}) to OCaml native numbers.")
(description "@code{ocaml-mirage-crypto-rng} provides an OCaml random
number generator interface, and implementations.")))
+(define-public ocaml-mirage-crypto-pk
+ (package
+ (inherit ocaml-mirage-crypto)
+ (name "ocaml-mirage-crypto-pk")
+ (arguments `(#:package "mirage-crypto-pk"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
+ ("ocaml-mirage-crypto-rng" ,ocaml-mirage-crypto-rng)
+ ("ocaml-mtime" ,ocaml-mtime)
+ ("ocaml-sexplib" ,ocaml-sexplib)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-zarith" ,ocaml-zarith)
+ ("ocaml-eqaf" ,ocaml-eqaf)
+ ("ocaml-rresult" ,ocaml-rresult)))
+ (native-inputs
+ `(("ocaml-ounit" ,ocaml-ounit)
+ ("ocaml-randomconv" ,ocaml-randomconv)))
+ (inputs `(("gmp" ,gmp)))
+ (synopsis "OCaml library providing public-key cryptography")
+ (description "@code{ocaml-mirage-crypto-pk} provides public-key
+cryptography (RSA, DSA, DH) for OCaml.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 16/29] gnu: Add ocaml-asn1-combinators.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-16-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-asn1-combinators): New variable.
---
gnu/packages/ocaml.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (48 lines)
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
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 12/29] gnu: Add ocaml-randomconv.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-12-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-randomconv): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 11458d0039..f7956fe216 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7417,6 +7417,31 @@ time duration as an usigned 64 bit integer. This can be used for conversions
between various time units.")
(license license:isc)))
+(define-public ocaml-randomconv
+ (package
+ (name "ocaml-randomconv")
+ (version "0.1.3")
+ (home-page "https://github.com/hannesm/randomconv")
+ (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
+ "0pzq2zqz5bpy2snsvmn82hg79wfd0lmbbbhmhdvc8k20km86jqy7"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)))
+ (synopsis "OCaml library for converting random byte vectors to random numer")
+ (description
+ "This Ocaml library provides functions for converting random byte vectors
+as (C-like structures using @code{ocaml-cstruct}) to OCaml native numbers.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 22/29] gnu: Add ocaml-cstruct-unix.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-22-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-cstruct-unix): New variable.
---
gnu/packages/ocaml.scm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

Toggle diff (29 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6effe1ff12..a9a4c8a684 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3412,6 +3412,22 @@ to access C-like structures directly from OCaml. It supports both reading and
writing to these structures, and they are accessed via the Bigarray module.")
(license license:isc)))
+(define-public ocaml-cstruct-unix
+ (package
+ (inherit ocaml-cstruct)
+ (name "ocaml-cstruct-unix")
+ (build-system dune-build-system)
+ (arguments
+ `(#:package "cstruct-unix"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)))
+ (synopsis "Unix variation of the @code{ocaml-cstruct} library for accessing C-like structures directly from OCaml")
+ (description "Cstruct is a library and syntax extension to make it easier to access C-like
+structures directly from OCaml. It supports both reading and writing to these
+structures, and they are accessed via the `Bigarray` module.")
+ (license license:isc)))
+
(define-public ocaml-hex
(package
(name "ocaml-hex")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 15/29] gnu: Add ocaml-ptime.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-15-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ptime): New variable.
---
gnu/packages/ocaml.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a34c844059..ab385eb26f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7487,6 +7487,48 @@ number generator interface, and implementations.")))
(description "@code{ocaml-mirage-crypto-pk} provides public-key
cryptography (RSA, DSA, DH) for OCaml.")))
+(define-public ocaml-ptime
+ (package
+ (name "ocaml-ptime")
+ (version "0.8.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "https://erratique.ch/software/ptime/releases/ptime-0.8.5.tbz")
+ (sha256
+ (base32
+ "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27"))))
+ (build-system ocaml-build-system)
+ (arguments
+ `(#:tests? #f
+ #:build-flags (list "build" "--with-js_of_ocaml" "false")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (propagated-inputs
+ `(("ocaml-result" ,ocaml-result)))
+ (native-inputs
+ `(("ocamlbuild" ,ocamlbuild)
+ ("ocaml-topkg" ,ocaml-topkg)
+ ("opam" ,opam)))
+ (home-page "https://erratique.ch/software/ptime")
+ (synopsis "POSIX time for OCaml")
+ (description "Ptime has platform independent POSIX time support in pure
+OCaml. It provides a type to represent a well-defined range of POSIX
+timestamps with picosecond precision, conversion with date-time values,
+conversion with RFC 3339 timestamps and pretty printing to a human-readable,
+locale-independent representation.
+
+The additional Ptime_clock library provides access to a system POSIX clock and
+to the system's current time zone offset.
+
+Ptime is not a calendar library.
+
+Ptime depends on the @code{ocaml-result} compatibility package. Ptime_clock
+depends on your system library. Ptime_clock's optional JavaScript support
+depends on @code{js-of-ocaml}.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 19/29] gnu: Add ocaml-mirage-crypto-ec.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-19-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-mirage-crypto-ec): New variable.
---
gnu/packages/ocaml.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2cc91ea2c0..8463682e79 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7624,6 +7624,40 @@ 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 ocaml-mirage-crypto-ec
+ ;; FIXME: This package contains generated code (see
+ ;; https://github.com/mirage/mirage-crypto/blob/main/ec/native/README.md). These
+ ;; should be re-generated during the build process.
+ (package
+ (inherit ocaml-mirage-crypto)
+ (name "ocaml-mirage-crypto-ec")
+ (arguments `(#:package "mirage-crypto-ec"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-eqaf" ,ocaml-eqaf)
+ ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
+ ("ocaml-mirage-crypto-rng" ,ocaml-mirage-crypto-rng)
+ ("gmp" ,gmp)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("ocaml-randomconv" ,ocaml-randomconv)
+ ("ocaml-ounit" ,ocaml-ounit)
+ ("ocaml-mirage-crypto-pk" ,ocaml-mirage-crypto-pk)
+ ("ocaml-hex" ,ocaml-hex)
+ ("ocaml-alcotest" ,ocaml-alcotest)
+ ("ocaml-asn1-combinators" ,ocaml-asn1-combinators)
+ ("ocaml-ppx-deriving-yojson" ,ocaml-ppx-deriving-yojson)
+ ("ocaml-ppx-deriving" ,ocaml-ppx-deriving)
+ ("ocaml-yojson" ,ocaml-yojson)))
+ (synopsis "OCaml library providing Elliptic Curve Cryptography")
+ (description "This OCaml library provides an implementation of key exchange
+(ECDH) and digital signature (ECDSA/EdDSA) algorithms. The curves P224
+(SECP224R1), P256 (SECP256R1), P384 (SECP384R1),P521 (SECP521R1), and 25519
+(X25519, Ed25519) are implemented by this package.")
+ ;; See https://github.com/mirage/mirage-crypto/blob/main/ec/LICENSE.md
+ (license license:expat)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 18/29] gnu: Add ocaml-ppx-deriving-yojson.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-18-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ppx-deriving-yojson): New variable.
---
gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f385aa2a94..2cc91ea2c0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4560,6 +4560,35 @@ generating code based on type definitions, and a set of useful plugins for
common tasks.")
(license license:expat)))
+(define-public ocaml-ppx-deriving-yojson
+ (package
+ (name "ocaml-ppx-deriving-yojson")
+ (version "3.6.1")
+ (home-page "https://github.com/ocaml-ppx/ppx_deriving_yojson")
+ (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
+ "1icz5h6p3pfj7my5gi7wxpflrb8c902dqa17f9w424njilnpyrbk"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-yojson" ,ocaml-yojson)
+ ("ocaml-result" ,ocaml-result)
+ ("ocaml-ppx-deriving" ,ocaml-ppx-deriving)
+ ("ocaml-ppxlib" ,ocaml-ppxlib)))
+ (native-inputs `(("ocaml-ounit" ,ocaml-ounit)))
+ (properties `((upstream-name . "ppx_deriving_yojson")))
+ (synopsis "JSON codec generator for OCaml")
+ (description "@code{ocaml-ppx-deriving-yojson} is an OCaml ppx_deriving
+plugin that provides a JSON codec generator.")
+ (license license:expat)))
+
(define-public ocaml-craml
(package
(name "ocaml-craml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 25/29] gnu: Add ocaml-lwt-log.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-25-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-lwt-log): New variable.
---
gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e832adc069..d475b75287 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7404,6 +7404,30 @@ establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
@code{ocaml-lwt}.")
(license license:isc)))
+(define-public ocaml-lwt-log
+ (package
+ (name "ocaml-lwt-log")
+ (version "1.1.1")
+ (home-page "https://github.com/ocsigen/lwt_log")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs `(("ocaml-lwt" ,ocaml-lwt)))
+ (properties `((upstream-name . "lwt_log")))
+ (synopsis "OCaml/Lwt logging library (deprecated)")
+ (description "This OCaml library provides helpers for logging is
+deprecated for @code{ocaml-logs}.")
+ (license license:lgpl2.1)))
+
(define-public ocaml-eqaf
(package
(name "ocaml-eqaf")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 28/29] gnu: Add ocaml-magic-mime.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-28-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-magic-mime): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 8904f2df19..d9e84cd7ad 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7248,6 +7248,31 @@ JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
version of the library. All of these implementations share the same IO logic
from this module.")))
+(define-public ocaml-magic-mime
+ (package
+ (name "ocaml-magic-mime")
+ (version "1.2.0")
+ (home-page "https://github.com/mirage/ocaml-magic-mime")
+ (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
+ "1pmwxw5n0lxbp7b9z1wplkn0cfl816cbacx3cdj2912n5zyjpjnk"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (synopsis "OCaml library for mapping filenames to common MIME types")
+ (description "This library contains a database of MIME types that maps
+filename extensions into MIME types suitable for use in many Internet
+protocols such as HTTP or e-mail. It is generated from the `mime.types` file
+found in Unix systems, but has no dependency on a filesystem since it includes
+the contents of the database as an ML datastructure.")
+ (license license:isc)))
+
(define-public ocaml-domain-name
(package
(name "ocaml-domain-name")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 24/29] gnu: Add ocaml-ca-certs.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-24-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ca-certs): New variable.
---
gnu/packages/ocaml.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3ce07057f5..e832adc069 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7772,6 +7772,44 @@ which is also implemented by this library - namely PKCS 1, PKCS 5, PKCS 7,
PKCS 8, PKCS 9, PKCS 10, and PKCS 12.")
(license license:bsd-2)))
+(define-public ocaml-ca-certs
+ (package
+ (name "ocaml-ca-certs")
+ (version "0.2.1")
+ (home-page "https://github.com/mirage/ca-certs")
+ (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
+ "0qkxdrqyah24fz80hwkycdj50nybfjfz9b04qscv01r2ifb0kqy5"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."
+ ;; Tests are failing as they require certificates to be in /etc/ssl/certs
+ #:tests? #f))
+ (propagated-inputs
+ `(("ocaml-astring" ,ocaml-astring)
+ ("ocaml-bos" ,ocaml-bos)
+ ("ocaml-fpath" ,ocaml-fpath)
+ ("ocaml-rresult" ,ocaml-rresult)
+ ("ocaml-ptime" ,ocaml-ptime)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
+ ("ocaml-x509" ,ocaml-x509)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)))
+ (synopsis
+ "Detect root CA certificates from the operating system")
+ (description
+ "TLS requires a set of root anchors (Certificate Authorities) to
+authenticate servers. This library exposes this list so that it can be
+registered with ocaml-tls.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 27/29] gnu: Add ocaml-conduit-lwt-unix.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-27-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-conduit-lwt-unix): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index cadd22cb9c..8904f2df19 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7454,6 +7454,31 @@ deprecated for @code{ocaml-logs}.")
performs I/O concurrently.")
(license license:lgpl2.1+))) ; with linking exception
+(define-public ocaml-conduit-lwt-unix
+ (package
+ (inherit ocaml-conduit)
+ (name "ocaml-conduit-lwt-unix")
+ (arguments `(#:package "conduit-lwt-unix"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-logs" ,ocaml-logs)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-conduit-lwt" ,ocaml-conduit-lwt)
+ ("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-uri" ,ocaml-uri)
+ ("ocaml-ipaddr" ,ocaml-ipaddr)
+ ("ocaml-ipaddr-sexp" ,ocaml-ipaddr-sexp)
+ ("ocaml-ca-certs" ,ocaml-ca-certs)))
+ (native-inputs
+ `(("ocaml-lwt-log" ,ocaml-lwt-log)
+ ("ocaml-ssl" ,ocaml-ssl)
+ ("ocaml-lwt-ssl" ,ocaml-lwt-ssl)))
+ (synopsis "OCaml library for establishing TCP and SSL/TLC connections using Lwt_unix")
+ (description "This OCaml library provides an implementation for
+establishing TCP and SSL/TLS connections for the @code{ocaml-conduit}
+signatures using Lwt_unix.")
+ (license license:isc)))
+
(define-public ocaml-eqaf
(package
(name "ocaml-eqaf")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 20/29] gnu: Add ocaml-gmap.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-20-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-gmap): New variable.
---
gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 8463682e79..e520151adf 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7658,6 +7658,32 @@ The only ASN.1 encodings currently supported are BER and DER.")
;; See https://github.com/mirage/mirage-crypto/blob/main/ec/LICENSE.md
(license license:expat)))
+(define-public ocaml-gmap
+ (package
+ (name "ocaml-gmap")
+ (version "0.3.0")
+ (home-page "https://github.com/hannesm/gmap")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0880mhcybr662k6wnahx5mwbialh878kkzxacn47qniadd21x411"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)
+ ("ocaml-fmt" ,ocaml-fmt)))
+ (synopsis "OCaml library for heterogenous maps over a Generalized
+Algebraic Data Type")
+ (description "@code{ocaml-gmap} exposes an OCaml functor which can be used
+to create a type-safe heterogenous maps.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 23/29] gnu: Add ocaml-x509.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-23-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-x509): New variable.
---
gnu/packages/ocaml.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a9a4c8a684..3ce07057f5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7726,6 +7726,52 @@ to create a type-safe heterogenous maps.")
PKCS#5 using @code{ocaml-mirage-crypto}.")
(license license:bsd-2)))
+(define-public ocaml-x509
+ (package
+ (name "ocaml-x509")
+ (version "0.14.0")
+ (home-page "https://github.com/mirleft/ocaml-x509")
+ (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
+ "0b51vzyxxkhwgx12dg55clb1lb971cxlmsk4wlxzs5h115j5hcy7"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-asn1-combinators" ,ocaml-asn1-combinators)
+ ("ocaml-ptime" ,ocaml-ptime)
+ ("ocaml-base64" ,ocaml-base64)
+ ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
+ ("ocaml-mirage-crypto-pk" ,ocaml-mirage-crypto-pk)
+ ("ocaml-mirage-crypto-ec" ,ocaml-mirage-crypto-ec)
+ ("ocaml-mirage-crypto-rng" ,ocaml-mirage-crypto-rng)
+ ("ocaml-rresult" ,ocaml-rresult)
+ ("ocaml-fmt" ,ocaml-fmt)
+ ("ocaml-gmap" ,ocaml-gmap)
+ ("ocaml-domain-name" ,ocaml-domain-name)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-pbkdf" ,ocaml-pbkdf)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)
+ ("ocaml-cstruct-unix" ,ocaml-cstruct-unix)))
+ (synopsis "Public Key Infrastructure (RFC 5280, PKCS) purely in OCaml")
+ (description "X.509 is a public key infrastructure used mostly on the
+Internet. It consists of certificates which include public keys and
+identifiers, signed by an authority. Authorities must be exchanged over a
+second channel to establish the trust relationship. This OCaml library
+implements most parts of RFC5280 and RFC6125. The Public Key Cryptography
+Standards (PKCS) defines encoding and decoding (in ASN.1 DER and PEM format),
+which is also implemented by this library - namely PKCS 1, PKCS 5, PKCS 7,
+PKCS 8, PKCS 9, PKCS 10, and PKCS 12.")
+ (license license:bsd-2)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 26/29] gnu: Add ocaml-lwt-ssl.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-26-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-lwt-ssl): New variable.
---
gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d475b75287..cadd22cb9c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7428,6 +7428,32 @@ establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
deprecated for @code{ocaml-logs}.")
(license license:lgpl2.1)))
+(define-public ocaml-lwt-ssl
+ (package
+ (name "ocaml-lwt-ssl")
+ (version "1.1.3")
+ (home-page "https://github.com/ocsigen/lwt_ssl")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0v417ch5zn0yknj156awa5mrq3mal08pbrvsyribbn63ix6f9y3p"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-ssl" ,ocaml-ssl)))
+ (properties `((upstream-name . "lwt_ssl")))
+ (synopsis "OpenSSL binding for OCaml with concurrent I/O")
+ (description "An Lwt-enabled wrapper around @code{ocaml-ssl}, that
+performs I/O concurrently.")
+(license license:lgpl2.1+))) ; with linking exception
+
(define-public ocaml-eqaf
(package
(name "ocaml-eqaf")
--
2.32.0
P
P
pukkamustard wrote on 4 Aug 2021 09:15
[PATCH 29/29] gnu: Add ocaml-cohttp-lwt-unix
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210804071545.21181-29-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-cohttp-lwt-unix): New variable.
---
gnu/packages/ocaml.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d9e84cd7ad..db195996c9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7248,6 +7248,29 @@ JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
version of the library. All of these implementations share the same IO logic
from this module.")))
+(define-public ocaml-cohttp-lwt-unix
+ (package
+ (inherit ocaml-cohttp)
+ (name "ocaml-cohttp-lwt-unix")
+ (arguments `(#:package "cohttp-lwt-unix"
+ ;; tests require network
+ #:tests? #f))
+ (propagated-inputs
+ `(("ocaml-conduit-lwt" ,ocaml-conduit-lwt)
+ ("ocaml-conduit-lwt-unix" ,ocaml-conduit-lwt-unix)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)
+ ("ocaml-magic-mime" ,ocaml-magic-mime)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-fmt" ,ocaml-fmt)
+ ("ocaml-cohttp-lwt" ,ocaml-cohttp-lwt)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-lwt-ssl" ,ocaml-lwt-ssl)))
+ (native-inputs `(("ocaml-ounit" ,ocaml-ounit)))
+ (synopsis "OCaml HTTP implementation for Unix and Windows using Lwt")
+ (description "An OCaml implementation of an HTTP client and server for
+Unix and Windows using the Lwt concurrency library.")))
+
(define-public ocaml-magic-mime
(package
(name "ocaml-magic-mime")
--
2.32.0
X
X
Xinglu Chen wrote on 5 Aug 2021 17:38
Re: [bug#49867] [PATCH 00/29] gnu: Add ocaml-cohttp-lwt-unix.
(name . pukkamustard)(address . pukkamustard@posteo.net)
87wnozkil2.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (13 lines)
> Hi,
>
> These patches add ocaml-cohttp-lwt-unix - an OCaml HTTP library - and dependencies.
>
> Some known rough edges:
>
> - ocaml-eqaf: Tests are disabled for now as I am not able to build
> ocaml-afl-persistent which is a dependency for ocaml-crowbar which is
> required to run ocaml-eqaf tests. There is ongoing work to port
> ocaml-afl-persistent to dune
> (https://github.com/stedolan/ocaml-afl-persistent/pull/7) with that it
> should be much easier to build it and enable tests for ocaml-eqaf.

I managed to package ‘ocaml-afl-persistent’ with the attached patch,
but it doesn’t respect the ‘--without-tests’ transformation since the
tests are run as part of the build phase.

Thanks for working on this!
From 49918dee551c9fa9acddfcf1162007d26f0bdff6 Mon Sep 17 00:00:00 2001
Message-Id: <49918dee551c9fa9acddfcf1162007d26f0bdff6.1628177652.git.public@yoctocell.xyz>
From: Xinglu Chen <public@yoctocell.xyz>
Date: Thu, 5 Aug 2021 17:33:51 +0200
Subject: [PATCH] gnu: Add ocaml-afl-persistent.

* gnu/packages/ocaml.scm (ocaml-afl-persistent): New variable.
---
gnu/packages/ocaml.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bb42003de2..321908f8ba 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7183,6 +7183,39 @@ It makes it possible to run pure OCaml programs in JavaScript environment like
browsers and Node.js.")
(license license:lgpl2.1+)))
+(define-public ocaml-afl-persistent
+ (package
+ (name "ocaml-afl-persistent")
+ (version "1.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/stedolan/ocaml-afl-persistent")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i"))))
+ (build-system ocaml-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (invoke "./build.sh")))
+ ;; XXX: The tests are already run in the build.sh script.
+ (delete 'check))))
+ (native-inputs
+ `(("opam" ,opam)))
+ (home-page "https://github.com/stedolan/ocaml-afl-persistent")
+ (synopsis "Use afl-fuzz in persistent mode")
+ (description
+ "afl-fuzz normally works by repeatedly forking the program being tested.
+Using this package, you can run afl-fuzz in ``persistent mode'', which avoids
+repeated forking and is much faster.")
+ (license license:expat)))
+
(define-public ocaml-bibtex2html
(package
(name "ocaml-bibtex2html")

base-commit: ead6cc03c66ed31f0ab7300fab11cef3a1e459f0
prerequisite-patch-id: 13039007a822f956c10ede72109a6a74e5bb2b08
--
2.32.0
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMBekVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5tlMP/3S0RPUxDZkK7I1x6ePQGwiED8hr
VvfCb/lIRjXMRtgM3vj7RbkXbphRcc3x2XYajQNhnoVsCBBytR7vbsV5oHL3yOgY
cUGvXz8TRh+/x+gQJyXo3enzhEpGCH2qADv9Iif+uY+8wGOnDvxotm4ObU3/+COB
9ewTGxZ49wExfrKR3Zvupdo8WGWJGZFI8xWWXZUBxP906yRB8HZDnn4GIwmDgldw
McG0RLAMrB/CNGNcVeTzZ9H7BG05EtmenSIEb7+K9a2iogeKmEB2U3u+HyUDdUzi
TOt2py9DrV2GZYToo4ZvGLC/4pD7mbpPHm47igMYKCF93NeGvbs2B0OsEcPvqbjz
5ZGUvmvzJAxBI2Yb6giepTApNOmnXiCMzl3ZwQTvKu0FsuqFoe+7kciE8xvaKKHb
qWc5k0LURTyJ3VuX59lfnNZ/KP668tQk31CT7FB7AR3HtrjeBexzYyAehvKEbdQe
L+TXhFZA3XeX1ft2F2cmylpCvRScgc3QO+/uNPpeMhLuWzrMb/JxeFkJMi41iIwF
o66+z0Q+ZKeGOHJOhoYb/lwEyFUNwoQZ2DCEd8FcaBU9BxZIrJT7rPtRm5ERtPCk
bFh88yQUF91BIn7+IORgdJ7jgs8oX9zB17Yv3kvomvfP69zYwWZuf7gfg2FIGcnr
V3tXOplhzoDNpTxT
=ijAm
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 5 Aug 2021 17:42
Re: [bug#49867] [PATCH 13/29] gnu: Add ocaml-mirage-crypto-rng.
(name . pukkamustard)(address . pukkamustard@posteo.net)
87tuk3kie4.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (31 lines)
> * gnu/packages/ocaml.scm (ocaml-mirage-crypto-rng): New variable.
> ---
> gnu/packages/ocaml.scm | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index f7956fe216..6af9bedc65 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -7442,6 +7442,26 @@ between various time units.")
> as (C-like structures using @code{ocaml-cstruct}) to OCaml native numbers.")
> (license license:isc)))
>
> +(define-public ocaml-mirage-crypto-rng
> + (package
> + (inherit ocaml-mirage-crypto)
> + (name "ocaml-mirage-crypto-rng")
> + (arguments `(#:package "mirage-crypto-rng"
> + #:test-target "."))
> + (propagated-inputs
> + `(("ocaml-duration" ,ocaml-duration)
> + ("ocaml-cstruct" ,ocaml-cstruct)
> + ("ocaml-logs" ,ocaml-logs)
> + ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
> + ("ocaml-mtime" ,ocaml-mtime)
> + ("ocaml-lwt" ,ocaml-lwt)))
> + (native-inputs
> + `(("ocaml-ounit" ,ocaml-ounit)
> + ("ocaml-randomconv" ,ocaml-randomconv)))
> + (synopsis "OCaml library providing a cryptographically secure pseudorandom number generator")

Keep lines at ~80 characters. To keep the synopsis slighty shorter,
maybe

"Cryptographically secure pseudo-random number generator in OCaml"

WDYT?
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMBuMVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5lzcQAKbVkkb+m/auLsnClVQ7Zm7ZlRlh
CJcflDS9nGXIZb65N5LtNfXejNLVhjRU981yYMUdgm2/PSvaYqmHm9VswsfI+mXB
SqoHCx+8TUodct5XsNXFOlwZbX6l6ekpl6UrBHufYWZeT3ddb7cGm6lc+aj9LejI
XUsnjVfHsLpgIKQDVln9R98JJZAdeg1vEGfM89n+80lM8WwXJpje4872WGFu86Uf
LJArQF1QdbcfgHIr+oEI6zGZOicrXOmVvQqRVLgDDJfdOVpxzD2/Ykb7+dU/yO3D
7P0jWBR53DPyRxcfM67YpNDXurDN58f5tufziLGnU2DnUslqpsX0aGNQq9lfMePt
8D4sKq3Thg0o+qRwo9yIrYt8apTCQJS4Blq3ObZx/qnBI6VulBTI3lkDWjnUeJlY
LXtLdcNxSS5jyORzCPR5RnQQyjojFSp5Q16FfC324ZR2UlDd5gEavtbjvBwUG1wD
famiui8HvI3MOFP1BHltqxRNxRFokWyw9EFIakEcVeYIuhEX7ALuOR+0nJQaPpo8
uwwURUi9B/yOrpU+iXVK/3MH/BV8udGfvApnTr0pVWCGVqiL7udAdbM2agYhp/3Y
zjz2ySKK5kIBqPDxe9hvuz7xsKlbMNtjn0ziPQutaAzRpiCccaA98m6T/o1MkDPY
WpkLNUJP+TKexFkz
=gqj7
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 5 Aug 2021 17:48
Re: [bug#49867] [PATCH 15/29] gnu: Add ocaml-ptime.
(name . pukkamustard)(address . pukkamustard@posteo.net)
87r1f7ki3c.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (22 lines)
> * gnu/packages/ocaml.scm (ocaml-ptime): New variable.
> ---
> gnu/packages/ocaml.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index a34c844059..ab385eb26f 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -7487,6 +7487,48 @@ number generator interface, and implementations.")))
> (description "@code{ocaml-mirage-crypto-pk} provides public-key
> cryptography (RSA, DSA, DH) for OCaml.")))
>
> +(define-public ocaml-ptime
> + (package
> + (name "ocaml-ptime")
> + (version "0.8.5")
> + (source
> + (origin
> + (method url-fetch)
> + (uri "https://erratique.ch/software/ptime/releases/ptime-0.8.5.tbz")

Use (string-append "https://erratique.ch..." version ".tbz") to make it
easier to update the package in the future.

Toggle quote (7 lines)
> + (sha256
> + (base32
> + "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27"))))
> + (build-system ocaml-build-system)
> + (arguments
> + `(#:tests? #f

What’s the reason for disabling tests?

Toggle quote (14 lines)
> + #:build-flags (list "build" "--with-js_of_ocaml" "false")
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure))))
> + (propagated-inputs
> + `(("ocaml-result" ,ocaml-result)))
> + (native-inputs
> + `(("ocamlbuild" ,ocamlbuild)
> + ("ocaml-topkg" ,ocaml-topkg)
> + ("opam" ,opam)))
> + (home-page "https://erratique.ch/software/ptime")
> + (synopsis "POSIX time for OCaml")
> + (description "Ptime has platform independent POSIX time support in pure
> +OCaml. It provides a type to represent a well-defined range of POSIX
^
Double spacing. :-)

Toggle quote (9 lines)
> +timestamps with picosecond precision, conversion with date-time values,
> +conversion with RFC 3339 timestamps and pretty printing to a human-readable,
> +locale-independent representation.
> +
> +The additional Ptime_clock library provides access to a system POSIX clock and
> +to the system's current time zone offset.
> +
> +Ptime is not a calendar library.

Not really sure if this sentence is necessary. I think the previous
sentences has hade it pretty clear that it a time and date library.

Toggle quote (4 lines)
> +Ptime depends on the @code{ocaml-result} compatibility package. Ptime_clock
> +depends on your system library. Ptime_clock's optional JavaScript support
> +depends on @code{js-of-ocaml}.")

This two sentences are probably also not necessary for users of the
package. It should be the packager’s job to specify the dependencies. :-)
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMCGcVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5OTcP/2SfTwjLMPkRMzk38kwV1MsUg7kL
yJqhrshC58fQWbhVNyJS/CPUDTQBlZMC5sOhNnxfDv7V1R78GKqlq+IPXs/awGLG
LsTtic1BTbnotUON4FoGRhY9qVQIDFB8KH4F9lvY9N9srs34oXMNzjYT2gVEvihB
M85KrXPHF9L8xJPPIqGEojQMD9jyShFpDvWuxQvG2sVMiNwtgdRTUazn9B4krD76
Ph3vPQa9mrHyfTZXOs+RQcwF9HYFIfYUAx/KcYkwGJigAxyOJuecAR1Ql7kFYeLV
WgB5uhyl+yhWS9avNHlSZkBD7WWN7rr3PHTUHw3OG5mOai2zf81AjVpGdKjaP2q4
4nXS6C/NrpoldVbYyWYrPASWVEgQqdmvK1eCepBj75laZ5tfuNmkYGuJOoEyqMTm
GR4oqrtMPnksOEk/1GfYO6a43lY9+I89O/Bw2iOKmIeqKIwRVbn/fibnh3Dmy2C9
sMS3KhV+KWuAzQS3fHcVTQ8iH+xS+X0mDzT68UKAQNJw/3LZZuS7aoLY067T6aBf
nRYqhj1rrBpMxitYXroc5kIGcOwse2RhoAY8jJAlOSCS1rVQ2pNHprMVbHSGifF4
v8pdScOzm6ePyR4XyAXHKivIpVs/hiM2WZmbtorpI4YJVi3OJQjbuKsb3b8HZZM1
0ltSpjIxQi4G+Xz3
=5ofH
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 5 Aug 2021 17:55
Re: [bug#49867] [PATCH 21/29] gnu: Add ocaml-pbkdf.
(name . pukkamustard)(address . pukkamustard@posteo.net)
87o8abkhs5.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (38 lines)
> * gnu/packages/ocaml.scm (ocaml-pbkdf): New variable.
> ---
> gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index e520151adf..6effe1ff12 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -7684,6 +7684,32 @@ Algebraic Data Type")
> to create a type-safe heterogenous maps.")
> (license license:isc)))
>
> +(define-public ocaml-pbkdf
> + (package
> + (name "ocaml-pbkdf")
> + (version "1.1.0")
> + (home-page "https://github.com/abeaumont/ocaml-pbkdf")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url home-page)
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0scq1i7hiy8dgjdfrcaca3k7wzys35k1g2cdg7v4kfdqr6q1scb3"))))
> + (build-system dune-build-system)
> + (propagated-inputs
> + `(("ocaml-mirage-crypto" ,ocaml-mirage-crypto)))
> + (native-inputs
> + `(("ocaml-alcotest" ,ocaml-alcotest)))
> + (synopsis "OCaml library for password based key derivation functions
> +(PBKDF) from PKCS#5")
> + (description "An OCaml implementation of PBKDF 1 and 2 as defined by
> +PKCS#5 using @code{ocaml-mirage-crypto}.")

The description should contain full sentences, maybe

"This package provides an OCaml implementation of …"
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMCfoVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5v8EP/1AoviF0qvmdjjJyxhx0PmwW3il/
zMNe+59YGlITUWvJIvIOkxYzVoU42OLEETyTz0iCNegNUATcCgR5v6u7PIBFWxaM
MEvMoto+lMFNlb5jeLJa9mhvOYE4UjNs4DulpcOufJ0eWYBBszll57Z007Wbhcax
Nls1yQX97703+jhqtME8HUe04CTyQib76mFySICDBbIRSS2lAq4tKlSG2F/Fmrtg
E1RhN3HU94RBaOe5SUV3tlU7bFCgsNFsatEPc8E3rY4defsD+QHFuP22HSDHUdix
R3EPHyFYlOnuZCTDtEQXv2bvfeUFaRT81oFJ8xw/9g776ryBZ2sISVdsY0A4bmHb
5Rh4RIiFl7ZF7CQbS0L000W+dyvpgcdZlsdLhCnqx2EqC0tCiSg239HEcRNKZLqF
NInpPOitiI36ub3phCF7yNYwXFcPF4Rd02LA/mMeuugNKbH6xvGP/jF1VDnkc/Ta
juxqeDuSgFCiAtBWV/r7UzkfgvgInzRKPfn2yvEySvZ2dxt+DKiLxr9XNZb+IQNf
izrGDEZtdAC5MvUYGOVmitteEndm3N01cvhEC8ImW0cj4F4ekPwTtVtCZGb/mlzY
XLDD1s6PfLbOFsumCjRel7hzHiBYe24Eqg60Hj6gSHFYLwkFIPwb8ld2Bhrju2f4
wGuaKlP68VbKRHLQ
=fGM8
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 5 Aug 2021 18:02
Re: [bug#49867] [PATCH 22/29] gnu: Add ocaml-cstruct-unix.
(name . pukkamustard)(address . pukkamustard@posteo.net)
87lf5fkhh8.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (25 lines)
> * gnu/packages/ocaml.scm (ocaml-cstruct-unix): New variable.
> ---
> gnu/packages/ocaml.scm | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 6effe1ff12..a9a4c8a684 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -3412,6 +3412,22 @@ to access C-like structures directly from OCaml. It supports both reading and
> writing to these structures, and they are accessed via the Bigarray module.")
> (license license:isc)))
>
> +(define-public ocaml-cstruct-unix
> + (package
> + (inherit ocaml-cstruct)
> + (name "ocaml-cstruct-unix")
> + (build-system dune-build-system)
> + (arguments
> + `(#:package "cstruct-unix"
> + #:test-target "."))
> + (propagated-inputs
> + `(("ocaml-cstruct" ,ocaml-cstruct)))
> + (synopsis "Unix variation of the @code{ocaml-cstruct} library for accessing C-like structures directly from OCaml")

Keep lines at around ~80 characters (applies to the description too).
Maybe drop the second half of the synopsis, so

"Unix variation of the @code{ocaml-cstruct} library"

The desciption already mentions “access C-like structures directly from
OCaml.”; the synopsis of ‘ocaml-cstruct’ also mentions “Access C
structures via a camlp4 extension”.

WDYT?
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMC4MVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x57fAP/3D/IXrg1ZiJaa2ivZQPMZlTNBLA
v0Ds0SPkIJlE8u8docAiAKb0+W2xh8Mb97XXv2eVPMJJoyx1VuFh+A8uaXSZ++pc
A2UnG/Ag8zgXnEPAovRkJlr5iDdQxcOr85YUC8DZ/fahPE0l9nZXQDxoWgeUyqvn
9twzAllrm+tpPbJ5o+jsMuRZ/epJVr/FrI/99qDdPRoG468oDJ285vGk4C6gyNQV
eAvWKSCk8HE1pCYhS6rNbdcXYvfOEisDJtXO8lL3n3fP8IiCttM9tPJzi7GmT0sf
K2ExpXUZ1jv94Xep+MhHMr6SVp43bVtqsf/LGg7k45rOsmGXAsfTmbseLBEUrLw2
KnQQ4dluvZmkFy4Fw6WMlfwH5rdGkq3hqOwFAuWNC6OPHo3HYeTQOKH9+RxM8IVH
SXMqRelddi20IBIY1IXbyxfPoD7zoedUB69J9hRzQA61oQop90SJaoXacZWZWZCP
Deu9igzaGXjJPyBNouDZoy9Qw3dScCJzP8lJ7brlcYwSem360mWFpfTfOMK875ID
PQp59XErML960a4z4+Gumpwp7Qu8INg3JhdPeHvdvLvyb96Kt2CcYKm5ktgJ9ubF
1lik5numW/R9e5u7nxRgerWnUJEJpYldeBwL4/WuQCkLI96c5JJ9aO+bDZc4UnuZ
NMkDo+kDPEBKEHW4
=XnSW
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 5 Aug 2021 18:04
Re: [bug#49867] [PATCH 23/29] gnu: Add ocaml-x509.
(name . pukkamustard)(address . pukkamustard@posteo.net)
87im0jkhcl.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (57 lines)
> * gnu/packages/ocaml.scm (ocaml-x509): New variable.
> ---
> gnu/packages/ocaml.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 46 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index a9a4c8a684..3ce07057f5 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -7726,6 +7726,52 @@ to create a type-safe heterogenous maps.")
> PKCS#5 using @code{ocaml-mirage-crypto}.")
> (license license:bsd-2)))
>
> +(define-public ocaml-x509
> + (package
> + (name "ocaml-x509")
> + (version "0.14.0")
> + (home-page "https://github.com/mirleft/ocaml-x509")
> + (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
> + "0b51vzyxxkhwgx12dg55clb1lb971cxlmsk4wlxzs5h115j5hcy7"))))
> + (build-system dune-build-system)
> + (arguments `(#:test-target "."))
> + (propagated-inputs
> + `(("ocaml-cstruct" ,ocaml-cstruct)
> + ("ocaml-asn1-combinators" ,ocaml-asn1-combinators)
> + ("ocaml-ptime" ,ocaml-ptime)
> + ("ocaml-base64" ,ocaml-base64)
> + ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
> + ("ocaml-mirage-crypto-pk" ,ocaml-mirage-crypto-pk)
> + ("ocaml-mirage-crypto-ec" ,ocaml-mirage-crypto-ec)
> + ("ocaml-mirage-crypto-rng" ,ocaml-mirage-crypto-rng)
> + ("ocaml-rresult" ,ocaml-rresult)
> + ("ocaml-fmt" ,ocaml-fmt)
> + ("ocaml-gmap" ,ocaml-gmap)
> + ("ocaml-domain-name" ,ocaml-domain-name)
> + ("ocaml-logs" ,ocaml-logs)
> + ("ocaml-pbkdf" ,ocaml-pbkdf)))
> + (native-inputs
> + `(("ocaml-alcotest" ,ocaml-alcotest)
> + ("ocaml-cstruct-unix" ,ocaml-cstruct-unix)))
> + (synopsis "Public Key Infrastructure (RFC 5280, PKCS) purely in OCaml")
> + (description "X.509 is a public key infrastructure used mostly on the
> +Internet. It consists of certificates which include public keys and
> +identifiers, signed by an authority. Authorities must be exchanged over a
> +second channel to establish the trust relationship. This OCaml library
> +implements most parts of RFC5280 and RFC6125. The Public Key Cryptography
> +Standards (PKCS) defines encoding and decoding (in ASN.1 DER and PEM format),
> +which is also implemented by this library - namely PKCS 1, PKCS 5, PKCS 7,

Nit: Use ‘---’ instead of just ‘-’, see the fifth bullet point in “2.1
General Syntactic Conventions” in the Texinfo manual.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMDCoVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5CpEP/RL40YFW2v16BdfbRbSuD15LAdV6
x4CfSCjNDaKrm9wuQ1WhR6E4FzpJ98wO/ut5rNF7KnIEQi/nv/GF5XMYVOudPH1m
lE1Y2uu+D1Zv5ywjsf4hM1mVOG0VR8YE5XGiA7aueaQv0wNXJkDY5voEGGYlHUAa
wZUnI3oewgJsV9NPTYbKjYTDD+RfLIe17toQz3077AVqzMz1iXTOHBVFGG/9Exxm
eNSc188fN900u3lIBwsGlAUsCeciLSTWxKGCG2SziuTGhenB7EWWi5b5ihqvr/W3
JFrx9wE4U/p6WQhs9zbYtd27fJN789Fj3PWb3r2XA5klF4SG9rxvPmxI0iOgnYnB
KwsjW6/m0GvKPU5ok3kcquL1swHn9Qv9+IDBOuavgZ92VcVMFtw7C66mANGZXTyg
SxTrzmnfg/b0Hn+0XAnGAhYiPKhF4uZ/OwQcvwSOpfJ/xClm+U0aJ2EKg7IM9p6P
vOuYUeflH27LV7Ek4hn7iC7DJAb9bMdOt9F61MOWntvExllfZNLOCj44Nt1AHNJp
8dYjQS20Y18zzrgLVfqCwgSuXmVo+4dl+iycO4zpUJ+ZMR32HPAqTMwNmEAKjDjN
OHLZBMv2lRyzNlp0S5coBuUjqiEcMQXmxTn/ObSCVEre+HM1UQMf9TipThsXaZrH
3EUijit8j8FBJ0Dr
=5jw9
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 5 Aug 2021 18:18
Re: [bug#49867] [PATCH 25/29] gnu: Add ocaml-lwt-log.
(name . pukkamustard)(address . pukkamustard@posteo.net)
87czqrkgpo.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (36 lines)
> * gnu/packages/ocaml.scm (ocaml-lwt-log): New variable.
> ---
> gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index e832adc069..d475b75287 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -7404,6 +7404,30 @@ establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
> @code{ocaml-lwt}.")
> (license license:isc)))
>
> +(define-public ocaml-lwt-log
> + (package
> + (name "ocaml-lwt-log")
> + (version "1.1.1")
> + (home-page "https://github.com/ocsigen/lwt_log")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url home-page)
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"))))
> + (build-system dune-build-system)
> + (arguments `(#:test-target "."))
> + (propagated-inputs `(("ocaml-lwt" ,ocaml-lwt)))
> + (properties `((upstream-name . "lwt_log")))
> + (synopsis "OCaml/Lwt logging library (deprecated)")
> + (description "This OCaml library provides helpers for logging is
> +deprecated for @code{ocaml-logs}.")

This sentence is a bit weird, maybe

This OCaml library provides helpers for logging; it has been
deprecated in favor of @code{ocaml-logs}.

Toggle quote (2 lines)
> + (license license:lgpl2.1)))

COPYING[1] say lgpgl2.1+, and “with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed”. You can probably
put a comment that mentions the exemption.

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMD2MVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5raMP/3o8UxsLQFRDMLwZBz1xp9c4sEW1
23Svd2hh13d3svvEEWwGhY6vIcPAmkhYflmF5Cp+UGWM20uqpejjLYNenAjvLMeI
CGQ0PsAcahyuUlxSC3dBO2y1H5qmqdDNtzjlmq04TD+eC1/BRsTad4zi3Ak/QH8N
lnBH0R+nZX9DWVoGTpL9S6wy4bCiHTiJP9N5e5bAJ44lGvP5/CnP3JEYlEQqXqZr
46EfSrrbjgMAQCwBzZ1U5So3wW43PjqLB9NS7tdBo81H/rKVx4y+BckxOJepnB6t
kSMb5FZKFgyJ6C+/TC2SNv3KVZNmlRZixCgRuY9Z5rfB/9atABMVsl/3P61jPdMM
9FuTh/pIAslMdsrenQX1KdYjQ5+0TLLsJjKBMAi9QISUnC+D2I5HcjOgAVNPd+z9
oQ1cjAr37JehPFNduUIBzHNeK+Rt/MoYNuYjkgl3U4nKHfjkrNFxqNmKuvO0bx/G
P0AIjvltaNqZnA0JcZAxAv47ElQgSFdC/AHQRR3mrQSYOasNh3dVcRWLN34L6VJ/
Jkd1soTnlOeaT5ipbpYFzK7Zu7Nhd8x56Th/8wUcjkruMvf0yHxrlvYu4TugU91k
zHrJfIb6ggZXk1lX5mZ2rYtbyZsXSakmbPEWkX+XXftDb3gK5ZITdBfph8gg0VOx
8ZeNv1HU5q0kZClV
=Vyb2
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 5 Aug 2021 18:20
Re: [bug#49867] [PATCH 26/29] gnu: Add ocaml-lwt-ssl.
(name . pukkamustard)(address . pukkamustard@posteo.net)
87a6lvkgng.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (38 lines)
> * gnu/packages/ocaml.scm (ocaml-lwt-ssl): New variable.
> ---
> gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index d475b75287..cadd22cb9c 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -7428,6 +7428,32 @@ establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
> deprecated for @code{ocaml-logs}.")
> (license license:lgpl2.1)))
>
> +(define-public ocaml-lwt-ssl
> + (package
> + (name "ocaml-lwt-ssl")
> + (version "1.1.3")
> + (home-page "https://github.com/ocsigen/lwt_ssl")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url home-page)
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0v417ch5zn0yknj156awa5mrq3mal08pbrvsyribbn63ix6f9y3p"))))
> + (build-system dune-build-system)
> + (arguments `(#:test-target "."))
> + (propagated-inputs
> + `(("ocaml-lwt" ,ocaml-lwt)
> + ("ocaml-ssl" ,ocaml-ssl)))
> + (properties `((upstream-name . "lwt_ssl")))
> + (synopsis "OpenSSL binding for OCaml with concurrent I/O")
> + (description "An Lwt-enabled wrapper around @code{ocaml-ssl}, that
> +performs I/O concurrently.")

Write a complete sentence, maybe

This OCaml library provides an Lwt-enabled…

?
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMD7QVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x596QP/A7ZzSZzUgAz0tdj8L2x4iMZa2un
oAQmpk6vtfiV6lnqVYxPPXtamB3+8qVzpdshyY320sT9VtarX821ii38FnWVafhZ
JcgKfJnc1Iix1b9m1J/XbG7FpeOXTGUtvlvF0OV50MGUemyV57YjbdKTvwSBAwSi
MV3K6l6h4SbKaW9XHldpHBpBamagazAc7kPdjT8Nm7G7oR7hVqDA3inp/wcTFshi
X/gvXuHPKpuso/MWdmR47jNobl4nzV8wK4LwvLMjgpDcSHUF/XTqyZP2J20IRrrp
83Kgf05gcwhHRiozoIbUYSZQYgH2KkTgtJ+tMPL47BlN/VEAjrS5qSYVjb1l4k/x
HA4FcUe85kkzmvwshoB0d2yo3dP5UbMByxezBhE6BFjnEJgG6eBdlZJ4xTPnrl0W
wEXCKarpBx+GWUUGhJqPWaI1t34p6nyh0Q2n5SVtdC55SURjRwTrphSmat3rxsSP
JW6EQAGlHUHUe0QQVr/VQq9mKW1G0MA6CUdjydD14gOfMsmaUe0qXVCfC0c7+JsX
sfvipiYXh8M6onsynF7CbL8F6ihoxKf7kx59SWbbas76WxWVlNbXU5ovwMzQUN09
wPkLqATBam4ExlNQLr+ugpaLwYiVENsZZTJoXiEdbDF32LMsAp9oI7PMgUXrmyzY
OtAPe2W75gr/J9YF
=Hh52
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 5 Aug 2021 18:20
Re: [bug#49867] [PATCH 27/29] gnu: Add ocaml-conduit-lwt-unix.
(name . pukkamustard)(address . pukkamustard@posteo.net)
877dgzkgm7.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (34 lines)
> * gnu/packages/ocaml.scm (ocaml-conduit-lwt-unix): New variable.
> ---
> gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index cadd22cb9c..8904f2df19 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -7454,6 +7454,31 @@ deprecated for @code{ocaml-logs}.")
> performs I/O concurrently.")
> (license license:lgpl2.1+))) ; with linking exception
>
> +(define-public ocaml-conduit-lwt-unix
> + (package
> + (inherit ocaml-conduit)
> + (name "ocaml-conduit-lwt-unix")
> + (arguments `(#:package "conduit-lwt-unix"
> + #:test-target "."))
> + (propagated-inputs
> + `(("ocaml-logs" ,ocaml-logs)
> + ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
> + ("ocaml-conduit-lwt" ,ocaml-conduit-lwt)
> + ("ocaml-lwt" ,ocaml-lwt)
> + ("ocaml-uri" ,ocaml-uri)
> + ("ocaml-ipaddr" ,ocaml-ipaddr)
> + ("ocaml-ipaddr-sexp" ,ocaml-ipaddr-sexp)
> + ("ocaml-ca-certs" ,ocaml-ca-certs)))
> + (native-inputs
> + `(("ocaml-lwt-log" ,ocaml-lwt-log)
> + ("ocaml-ssl" ,ocaml-ssl)
> + ("ocaml-lwt-ssl" ,ocaml-lwt-ssl)))
> + (synopsis "OCaml library for establishing TCP and SSL/TLC connections using Lwt_unix")

Keep lines at ~80 characters. :-)
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMD+AVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5j8UP/0znH6GnP2bfjjavk3ay6VeyI7oJ
eYPJaFXiMmhtCG87OdP9SgouD/Uav/zQI5KTu7BAiuZ5PPwFtNmx507eDYB08xTd
lzCTLbfIvpKbeFBY8AhPNzQVhhi5UjNzYnfxVV7HuxyBLNaFKzxzJgViV1pxtfFn
197CiKG8JPivMxthtHuP6LZnfb1C/cdLboV2JD0qylcRZ2QZqtPPTrPZNdL1lkve
2cLp4cQl/4w+rMdukTfnzy2HxUcXtTGr4QF3aveAkUNnsb2nwPJq+1CutPpAbVO6
poIbaclO8VlWU24Lf4HjIBLm9WXTUCPgcdwPvEWggAzcXNkIVehpCksZMO700/Zj
SMD+iUVblEzsSRIA8KtN/tH3rMy+ze04L6sPpmYwYrvMpBD6mB6lSthwcARs8SmA
X4A+JIBxjWiw/58Y1YLJSGv86RYrmysHI3Y3UMHIvabbEh+FE8hUXuQ9CgQAYr+H
c/6K1mQm+8s1vHnjx4/m8c3396ylHrqaQpwBOno9C0WaEf6rM9IOS2hor2z3bLI2
lOTZMzUOVSQXr9855Cg0h7GmFZ7zkQ9QpN7Nodjmq2JX8b7UbTPnUBgIftI/L+TE
Ta7Vxs4PA3UY2ueu7rgx0TstL/cN45D/3r2F3ZGXUO80BKQ/EhM3X63wZ0v+s6A/
TDTS2QkAk7TxaqdC
=farj
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 5 Aug 2021 18:22
Re: [bug#49867] [PATCH 28/29] gnu: Add ocaml-magic-mime.
(name . pukkamustard)(address . pukkamustard@posteo.net)
874kc3kgjh.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (34 lines)
> * gnu/packages/ocaml.scm (ocaml-magic-mime): New variable.
> ---
> gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 8904f2df19..d9e84cd7ad 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -7248,6 +7248,31 @@ JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
> version of the library. All of these implementations share the same IO logic
> from this module.")))
>
> +(define-public ocaml-magic-mime
> + (package
> + (name "ocaml-magic-mime")
> + (version "1.2.0")
> + (home-page "https://github.com/mirage/ocaml-magic-mime")
> + (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
> + "1pmwxw5n0lxbp7b9z1wplkn0cfl816cbacx3cdj2912n5zyjpjnk"))))
> + (build-system dune-build-system)
> + (arguments `(#:test-target "."))
> + (synopsis "OCaml library for mapping filenames to common MIME types")
> + (description "This library contains a database of MIME types that maps
> +filename extensions into MIME types suitable for use in many Internet
> +protocols such as HTTP or e-mail. It is generated from the `mime.types` file
^^^^^^^^^^
Nit: @file{mime.types}
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMEEIVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5MPsQAJVeDTmWxEA4ZxlUTHBPQvUC5Wl6
v2SLNCdjM3ng6yFTYAseAHPv3Cl2B00HraNzqnsAg1yzun9JYzVA0plSXh2NSRnM
F1wY5n+1fYAlsGatT6pZYSsWnjHR6h1d6/SbU5ABOOd6fO8EG0/q9Tk+WbBawbbT
IFArPLJIlepLpNlLBHLmare1TDD/3Vmex5Ca77+zwc5RpI/u0m4SfixNJ+NXIrV1
Ixfs5nhGduWz3GE8loMEHDoDMSQPaSBganPamL+FH/82y0YpNsmlLWbx+2ati2B1
glO0PNTLcZLU00R6z4L89TIxNS1eoSll5q2uloE3ZrndI5Jkn6KNo88m2baI922D
cAxwWD0+3negnqZk6lyCwUodqjxtBcewtfE5TC/VlWR9sQ4YoaawP06JbTQ8QlS9
wOg6o3uFf+OsCAjwG243zEVN+kfotMl+rA8m3TLBf+FxHn0GJ0K8ns8T1qZdJMOC
2Bv39xCu64mpAX1KjFGoFXp5gF1gYvTL/aRm3sivT8sIypSb/C/BE0+WqVGpdHlX
EsBB70152JPrBfiu3ldRxy5xyKgPCjtfEUqK7+mxiZFSz67OJQNIXCH6zG+sFJtc
NRivwgrUCutWgLMoNGES23fEXwgS7dZx++aWlGzyNXagcQ6LefD3im0tyEMa2160
LVcLl8ifMS3OTCZ9
=QlTp
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 5 Aug 2021 18:25
Re: [bug#49867] [PATCH 29/29] gnu: Add ocaml-cohttp-lwt-unix
(name . pukkamustard)(address . pukkamustard@posteo.net)
871r77kgei.fsf@yoctocell.xyz
On Wed, Aug 04 2021, pukkamustard wrote:

Toggle quote (36 lines)
> * gnu/packages/ocaml.scm (ocaml-cohttp-lwt-unix): New variable.
> ---
> gnu/packages/ocaml.scm | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index d9e84cd7ad..db195996c9 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -7248,6 +7248,29 @@ JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
> version of the library. All of these implementations share the same IO logic
> from this module.")))
>
> +(define-public ocaml-cohttp-lwt-unix
> + (package
> + (inherit ocaml-cohttp)
> + (name "ocaml-cohttp-lwt-unix")
> + (arguments `(#:package "cohttp-lwt-unix"
> + ;; tests require network
> + #:tests? #f))
> + (propagated-inputs
> + `(("ocaml-conduit-lwt" ,ocaml-conduit-lwt)
> + ("ocaml-conduit-lwt-unix" ,ocaml-conduit-lwt-unix)
> + ("ocaml-cmdliner" ,ocaml-cmdliner)
> + ("ocaml-magic-mime" ,ocaml-magic-mime)
> + ("ocaml-logs" ,ocaml-logs)
> + ("ocaml-fmt" ,ocaml-fmt)
> + ("ocaml-cohttp-lwt" ,ocaml-cohttp-lwt)
> + ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
> + ("ocaml-lwt" ,ocaml-lwt)
> + ("ocaml-lwt-ssl" ,ocaml-lwt-ssl)))
> + (native-inputs `(("ocaml-ounit" ,ocaml-ounit)))
> + (synopsis "OCaml HTTP implementation for Unix and Windows using Lwt")
> + (description "An OCaml implementation of an HTTP client and server for
> +Unix and Windows using the Lwt concurrency library.")))

Full sentence, maybe

This OCaml library provides an implementation of an HTTP…

Also, I don’t think Windows support should be mentioned since it’s
not supported by Guix, and it’s non-free software. :-)
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEMEPYVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5GbIP/3tKkLxYj7cXuxa2d5MHMR8oc3Pl
gO0W6r7QlnY+IMTAMDhZ008+yEKoBwlzPPDVogVQPx+ULyc1u1xhGMeNBv6m/hIp
VKoNElUxrvUbAwA7DECYhg/tNFApCwzhI+1c13WSbcIBWe/Uz7fVJgutMkSEf/BC
VYxISdHjnjuEQTwNms+Cbx6wiVDLxLU5Fnf7bV6bwmssL91jQ8ixEjMdyjOLgLhg
kwaSuW7OkahgDgfF9MnSAICfklIS/V6f266NrmdwwP/H9grQi3BGhiwWlsU57/LS
mADiak93vE7F/Y7QzMPmTZQKAA1ibVkUmhvYUYC/gz4hDdmeCQkVv7LK5LOJbaKP
YZCQwTBv3UI9927r9/uejof/Hz0WMGU7CPyLCFRN48OF1zeRmQh/bS9ZKFlDnLjX
/wt+Z3KXcydDlvomhunJuMl3Ez8yOeaT8Ru7mTMSbkHwpW5KT+bEmvRyS6+Ut6b6
N/2VV3pENmXJ30M95+iFoDlBKShJDJsLa2nCCleUj5JlaAGIepJT3ZoGygyzR/Km
mAqCksIOso3/1P3x6eHsIgy+N5rCfsKDO1in8X/S5Qu8UT0MluiaopHPBLuGx1j2
Ceh97aJItPJlt7Q6LgoLsyBOnXm54FINkodUihMDAv0nEiVKuDD15tKlRWf9OZ5U
5f7lTQQ0JPZI4sCy
=rZa8
-----END PGP SIGNATURE-----

P
P
pukkamustard wrote on 8 Aug 2021 13:04
Re: [bug#49867] [PATCH 13/29] gnu: Add ocaml-mirage-crypto-rng.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
86lf5c6vv1.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (9 lines)
> Keep lines at ~80 characters. To keep the synopsis slighty
> shorter,
> maybe
>
> "Cryptographically secure pseudo-random number generator in
> OCaml"
>
> WDYT?

Sounds good! Fixed in V2.
P
P
pukkamustard wrote on 8 Aug 2021 13:13
Re: [bug#49867] [PATCH 15/29] gnu: Add ocaml-ptime.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
86im0g6vfr.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (4 lines)
> Use (string-append "https://erratique.ch..." version ".tbz") to
> make it
> easier to update the package in the future.

Done.

Toggle quote (11 lines)
>> + (sha256
>> + (base32
>> +
>> "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27"))))
>> + (build-system ocaml-build-system)
>> + (arguments
>> + `(#:tests? #f
>
> What’s the reason for disabling tests?
>

Laziness, I guess.. :)

Enabled in V2.

Toggle quote (8 lines)
>> + (description "Ptime has platform independent POSIX time
>> support in pure
>> +OCaml. It provides a type to represent a well-defined range of
>> POSIX
> ^
> Double spacing. :-)
>

Thanks!

Toggle quote (8 lines)
>> +Ptime is not a calendar library.
>
> Not really sure if this sentence is necessary. I think the
> previous
> sentences has hade it pretty clear that it a time and date
> library.
>

Agree, removed sentence.

Toggle quote (11 lines)
>> +Ptime depends on the @code{ocaml-result} compatibility
>> package. Ptime_clock
>> +depends on your system library. Ptime_clock's optional
>> JavaScript support
>> +depends on @code{js-of-ocaml}.")
>
> This two sentences are probably also not necessary for users of
> the
> package. It should be the packager’s job to specify the
> dependencies. :-)

Also agree. Removed sentences.
P
P
pukkamustard wrote on 8 Aug 2021 13:21
Re: [bug#49867] [PATCH 21/29] gnu: Add ocaml-pbkdf.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
86fsvk6v2e.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (8 lines)
>> + (description "An OCaml implementation of PBKDF 1 and 2 as
>> defined by
>> +PKCS#5 using @code{ocaml-mirage-crypto}.")
>
> The description should contain full sentences, maybe
>
> "This package provides an OCaml implementation of …"

Changed to: "This package provides an OCaml implementation of
PBKDF 1 and 2 as defined by PKCS#5 using
@code{ocaml-mirage-crypto}."

Note: A version 1.2.0 was released recently. However, it requires
CStruct 6.0.0. I will submit a patch to update ocaml-cstruct and
then ocaml-pbkdf can be updated to 1.2.0.
P
P
pukkamustard wrote on 8 Aug 2021 13:24
Re: [bug#49867] [PATCH 22/29] gnu: Add ocaml-cstruct-unix.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
86czqo6uxc.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (16 lines)
>> + (synopsis "Unix variation of the @code{ocaml-cstruct}
>> library for accessing C-like structures directly from OCaml")
>
> Keep lines at around ~80 characters (applies to the description
> too).
> Maybe drop the second half of the synopsis, so
>
> "Unix variation of the @code{ocaml-cstruct} library"
>
> The desciption already mentions “access C-like structures
> directly from
> OCaml.”; the synopsis of ‘ocaml-cstruct’ also mentions “Access C
> structures via a camlp4 extension”.
>
> WDYT?

I agree. Fixed in V2.

Also fixed a missing double-space in the description.
P
P
pukkamustard wrote on 8 Aug 2021 13:29
Re: [bug#49867] [PATCH 23/29] gnu: Add ocaml-x509.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
86a6ls6upc.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (19 lines)
>> + (description "X.509 is a public key infrastructure used
>> mostly on the
>> +Internet. It consists of certificates which include public
>> keys and
>> +identifiers, signed by an authority. Authorities must be
>> exchanged over a
>> +second channel to establish the trust relationship. This OCaml
>> library
>> +implements most parts of RFC5280 and RFC6125. The Public Key
>> Cryptography
>> +Standards (PKCS) defines encoding and decoding (in ASN.1 DER
>> and PEM format),
>> +which is also implemented by this library - namely PKCS 1,
>> PKCS 5, PKCS 7,
>
> Nit: Use ‘---’ instead of just ‘-’, see the fifth bullet point
> in “2.1
> General Syntactic Conventions” in the Texinfo manual.

Thanks! Done in V2.

Note: This has also been updated to 0.14.1 which requires Cstruct
6.0.0.
P
P
pukkamustard wrote on 8 Aug 2021 14:36
Re: [bug#49867] [PATCH 24/29] gnu: Add ocaml-ca-certs.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
867dgw6rlg.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (15 lines)
>> + ;; Tests are failing as they require
>> certificates to be in /etc/ssl/certs
>> + #:tests? #f))
>
> The same issue has been mentioned by NixOS people on their bug
> tracker[1], they solved[2] it by reading the NIX_SSL_CERT_FILE
> environment variable, which automatically gets set in the build
> environment if the ‘cacert’ package is specified as an input. I
> don’t
> know if Guix does something similar.
>
> [1]: <https://github.com/mirage/ca-certs/issues/16>
> [2]: <https://github.com/mirage/ca-certs/pull/17>
>

Thanks for the pointers.

Inspired by the package definition for curl, I tried setting
NIX_SSL_CERT_FILE with native-search-paths:

```
(native-search-paths
(list
(search-path-specification
(variable "NIX_SSL_CERT_FILE")
(file-type 'regular)
(separator #f) ;single entry
(files '("/etc/ssl/certs/ca-certificates.crt")))))
```

and adding `nss-certs` to the native-inputs.

However, this does not work. Some observations/questions:

- The NIX_SSL_CERT_FILE does not appear in the
`environment-variables` file when running `guix build -K`. I
would have expected it to be set there.
- `nss-certs` does not provide the `ca-certificates.crt` file. It
is built when creating a profile with the
`ca-certificate-bundle` hook. Is this run when creating a build
environment?

I seem to be not understanding a lot of things about the build
environment ... Pointers very welcome!

Toggle quote (21 lines)
>> + (propagated-inputs
>> + `(("ocaml-astring" ,ocaml-astring)
>> + ("ocaml-bos" ,ocaml-bos)
>> + ("ocaml-fpath" ,ocaml-fpath)
>> + ("ocaml-rresult" ,ocaml-rresult)
>> + ("ocaml-ptime" ,ocaml-ptime)
>> + ("ocaml-logs" ,ocaml-logs)
>> + ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
>> + ("ocaml-x509" ,ocaml-x509)))
>> + (native-inputs
>> + `(("ocaml-alcotest" ,ocaml-alcotest)))
>> + (synopsis
>> + "Detect root CA certificates from the operating system")
>> + (description
>> + "TLS requires a set of root anchors (Certificate
>> Authorities) to
>> +authenticate servers. This library exposes this list so that
>> it can be
> ^
> Double spacing.

Fixed in V2.
P
P
pukkamustard wrote on 8 Aug 2021 15:01
Re: [bug#49867] [PATCH 25/29] gnu: Add ocaml-lwt-log.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
864kc06qfh.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (15 lines)
> This sentence is a bit weird, maybe
>
> This OCaml library provides helpers for logging; it has been
> deprecated in favor of @code{ocaml-logs}.
>
>> + (license license:lgpl2.1)))
>
> COPYING[1] say lgpgl2.1+, and “with the additional exemption
> that
> compiling, linking, and/or using OpenSSL is allowed”. You can
> probably
> put a comment that mentions the exemption.
>
> [1]: <https://github.com/ocsigen/lwt_log/blob/master/COPYING>

While fixing the package definition, I notice that ocaml-lwt-log
already existed. V2 removes my patch for adding ocaml-lwt-log.
P
P
pukkamustard wrote on 8 Aug 2021 15:04
Re: [bug#49867] [PATCH 26/29] gnu: Add ocaml-lwt-ssl.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
861r746qb0.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (10 lines)
>> + (description "An Lwt-enabled wrapper around
>> @code{ocaml-ssl}, that
>> +performs I/O concurrently.")
>
> Write a complete sentence, maybe
>
> This OCaml library provides an Lwt-enabled…
>
> ?

Perfect. Using description as suggested in V2.
P
P
pukkamustard wrote on 8 Aug 2021 15:06
Re: [bug#49867] [PATCH 27/29] gnu: Add ocaml-conduit-lwt-unix.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
86y29c5bn8.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (5 lines)
>> + (synopsis "OCaml library for establishing TCP and SSL/TLC
>> connections using Lwt_unix")
>
> Keep lines at ~80 characters. :-)

Thanks! Fixed in V2.
P
P
pukkamustard wrote on 8 Aug 2021 15:07
Re: [bug#49867] [PATCH 28/29] gnu: Add ocaml-magic-mime.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
86v94g5bkt.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (9 lines)
>> + (description "This library contains a database of MIME
>> types that maps
>> +filename extensions into MIME types suitable for use in many
>> Internet
>> +protocols such as HTTP or e-mail. It is generated from the
>> `mime.types` file
> ^^^^^^^^^^
> Nit: @file{mime.types}

Fixed in V2.
P
P
pukkamustard wrote on 8 Aug 2021 15:14
Re: [bug#49867] [PATCH 29/29] gnu: Add ocaml-cohttp-lwt-unix
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
86sfzk5b9r.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (8 lines)
> Full sentence, maybe
>
> This OCaml library provides an implementation of an HTTP…
>
> Also, I don’t think Windows support should be mentioned since
> it’s
> not supported by Guix, and it’s non-free software. :-)

:) done and done (in V2).
P
P
pukkamustard wrote on 9 Aug 2021 08:55
Re: [bug#49867] [PATCH 00/29] gnu: Add ocaml-cohttp-lwt-unix.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
86pmun5cp5.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (6 lines)
> I managed to package ‘ocaml-afl-persistent’ with the attached
> patch,
> but it doesn’t respect the ‘--without-tests’ transformation
> since the
> tests are run as part of the build phase.

Fantastic! With your patch I've added ocaml-crowbar and enabled
tests for ocaml-eqaf in V2.

Tests for ocaml-crowbar are currently disabled as they require
ocaml-xmldiff which requires OCaml 4.12.0.

Toggle quote (2 lines)
> Thanks for working on this!

Thank you for your comments!

V2 follows.

-pukkamustard
P
P
pukkamustard wrote on 9 Aug 2021 08:59
[PATCH 01/31] gnu: Add ocaml-cohttp-lwt.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070012.25327-1-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-cohttp-lwt): New variable.
---
gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 112751ddec..6518f21f5e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7323,6 +7323,30 @@ HTTP parser, and implementations using various asynchronous programming
libraries.")
(license license:isc)))
+(define-public ocaml-cohttp-lwt
+ (package
+ (inherit ocaml-cohttp)
+ (name "ocaml-cohttp-lwt")
+ (arguments `(#:package "cohttp-lwt"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cohttp" ,ocaml-cohttp)
+ ("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-sexplib0" ,ocaml-sexplib0)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-uri" ,ocaml-uri)))
+ (synopsis "OCaml library for HTTP clients and servers using the Lwt
+concurrency library")
+ (description "This is a portable implementation of HTTP that uses the Lwt
+concurrency library to multiplex IO. It implements as much of the logic in an
+OS-independent way as possible, so that more specialised modules can be
+tailored for different targets. For example, you can install
+@code{ocaml-cohttp-lwt-unix} or @code{ocaml-cohttp-lwt-jsoo} for a Unix or
+JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
+version of the library. All of these implementations share the same IO logic
+from this module.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 08:59
[PATCH 02/31] gnu: Add ocaml-domain-name.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070012.25327-2-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-domain-name): New variable.
---
gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6518f21f5e..56e3c39c2d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7347,6 +7347,35 @@ JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
version of the library. All of these implementations share the same IO logic
from this module.")))
+(define-public ocaml-domain-name
+ (package
+ (name "ocaml-domain-name")
+ (version "0.3.0")
+ (home-page "https://github.com/hannesm/domain-name")
+ (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
+ "06l82k27wa446k0sd799i73rrqwwmqfm542blkx6bbm2xpxaz2cm"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-fmt" ,ocaml-fmt)
+ ("ocaml-astring" ,ocaml-astring)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)))
+ (synopsis "OCaml library for RFC 1035 Internet domain names")
+ (description "This OCaml library provides functions for working with
+Internet domain names (RFC 1035). For example, it provides functions for
+comparing domain names or checking if one domain name is a sub-domain of
+another.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:00
[PATCH v2 01/31] gnu: Add ocaml-cohttp-lwt.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-1-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-cohttp-lwt): New variable.
---
gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 112751ddec..6518f21f5e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7323,6 +7323,30 @@ HTTP parser, and implementations using various asynchronous programming
libraries.")
(license license:isc)))
+(define-public ocaml-cohttp-lwt
+ (package
+ (inherit ocaml-cohttp)
+ (name "ocaml-cohttp-lwt")
+ (arguments `(#:package "cohttp-lwt"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cohttp" ,ocaml-cohttp)
+ ("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-sexplib0" ,ocaml-sexplib0)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-uri" ,ocaml-uri)))
+ (synopsis "OCaml library for HTTP clients and servers using the Lwt
+concurrency library")
+ (description "This is a portable implementation of HTTP that uses the Lwt
+concurrency library to multiplex IO. It implements as much of the logic in an
+OS-independent way as possible, so that more specialised modules can be
+tailored for different targets. For example, you can install
+@code{ocaml-cohttp-lwt-unix} or @code{ocaml-cohttp-lwt-jsoo} for a Unix or
+JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
+version of the library. All of these implementations share the same IO logic
+from this module.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:00
[PATCH v2 02/31] gnu: Add ocaml-domain-name.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-2-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-domain-name): New variable.
---
gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6518f21f5e..56e3c39c2d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7347,6 +7347,35 @@ JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
version of the library. All of these implementations share the same IO logic
from this module.")))
+(define-public ocaml-domain-name
+ (package
+ (name "ocaml-domain-name")
+ (version "0.3.0")
+ (home-page "https://github.com/hannesm/domain-name")
+ (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
+ "06l82k27wa446k0sd799i73rrqwwmqfm542blkx6bbm2xpxaz2cm"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-fmt" ,ocaml-fmt)
+ ("ocaml-astring" ,ocaml-astring)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)))
+ (synopsis "OCaml library for RFC 1035 Internet domain names")
+ (description "This OCaml library provides functions for working with
+Internet domain names (RFC 1035). For example, it provides functions for
+comparing domain names or checking if one domain name is a sub-domain of
+another.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:00
[PATCH v2 03/31] gnu: Add ocaml-macaddr.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-3-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-macaddr): New variable.
---
gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 56e3c39c2d..34be7e5497 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7376,6 +7376,34 @@ comparing domain names or checking if one domain name is a sub-domain of
another.")
(license license:isc)))
+(define-public ocaml-macaddr
+ (package
+ (name "ocaml-macaddr")
+ (version "5.1.0")
+ (home-page "https://github.com/mirage/ocaml-ipaddr")
+ (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
+ "02pan5b8s4j5r68znjdb5mln3nffccdfsh4rw71x31b6qsrlqzgg"))))
+ (build-system dune-build-system)
+ (arguments `(#:package "macaddr"
+ #:test-target "."))
+ (native-inputs
+ `(("ocaml-ounit" ,ocaml-ounit)
+ ("ocaml-domain-name" ,ocaml-domain-name)
+ ("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)))
+ (synopsis "OCaml library for manipulation of MAC address representations")
+ (description "This OCaml library provides functions for manipulating MAC
+address representations.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:00
[PATCH v2 04/31] gnu: Add ocaml-ipaddr.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-4-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ipaddr): New variable.
---
gnu/packages/ocaml.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 34be7e5497..c167836db5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7404,6 +7404,25 @@ another.")
address representations.")
(license license:isc)))
+(define-public ocaml-ipaddr
+ (package
+ (inherit ocaml-macaddr)
+ (name "ocaml-ipaddr")
+ (arguments `(#:package "ipaddr"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-macaddr" ,ocaml-macaddr)
+ ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
+ ("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-domain-name" ,ocaml-domain-name)))
+ (native-inputs
+ `(("ocaml-ounit" ,ocaml-ounit)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)))
+ (synopsis "OCaml library for manipulation of IP address representations")
+ (description "This OCaml library provides functions for manipulating IP
+address representations. It supports IPv4 and IPv6.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:00
[PATCH v2 05/31] gnu: Add ocaml-ipaddr-cstruct.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-5-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ipaddr-cstruct): New variable.
---
gnu/packages/ocaml.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c167836db5..e47512ec18 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7423,6 +7423,19 @@ address representations.")
address representations. It supports IPv4 and IPv6.")
(license license:isc)))
+(define-public ocaml-ipaddr-cstruct
+ (package
+ (inherit ocaml-macaddr)
+ (name "ocaml-ipaddr-cstruct")
+ (arguments `(#:package "ipaddr-cstruct"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ipaddr" ,ocaml-ipaddr)
+ ("ocaml-cstruct" ,ocaml-cstruct)))
+ (synopsis "OCaml library for manipulation of IP addresses as C-like structres")
+ (description "This OCaml library provides functions for manipulating as
+C-like structures using the @code{ocaml-cstruct} library.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:00
[PATCH v2 06/31] gnu: Add ocaml-ipaddr-sexp.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-6-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ipaddr-sexp): New variable.
---
gnu/packages/ocaml.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e47512ec18..880b4d7836 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7436,6 +7436,23 @@ address representations. It supports IPv4 and IPv6.")
(description "This OCaml library provides functions for manipulating as
C-like structures using the @code{ocaml-cstruct} library.")))
+(define-public ocaml-ipaddr-sexp
+ (package
+ (inherit ocaml-macaddr)
+ (name "ocaml-ipaddr-sexp")
+ (arguments `(#:package "ipaddr-sexp"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ipaddr" ,ocaml-ipaddr)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-sexplib0" ,ocaml-sexplib0)))
+ (native-inputs
+ `(("ocaml-ipaddr-cstruct" ,ocaml-ipaddr-cstruct)
+ ("ocaml-ounit" ,ocaml-ounit)))
+ (synopsis "OCaml library for manipulation of IP addresses as S-expressions")
+ (description "This OCaml library provides functions for manipulating as
+S-expressions using the @code{ocaml-sexp} library.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 13/31] gnu: Add ocaml-mirage-crypto.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-13-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-mirage-crypto): New variable.
---
gnu/packages/ocaml.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7101cc6c2f..c6cdd3a318 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7592,6 +7592,37 @@ property-based testing and the magical bug-finding powers of
constant-time to avoid timing-attack with crypto stuff.")
(license license:expat)))
+(define-public ocaml-mirage-crypto
+ (package
+ (name "ocaml-mirage-crypto")
+ (version "0.10.3")
+ (home-page "https://github.com/mirage/mirage-crypto")
+ (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
+ "0j7x07c8xy8bmqp9ad1cib6j69dy7acjg9m1d7pn0dnmbkrl8fiz"))))
+ (build-system dune-build-system)
+ (arguments `(#:package "mirage-crypto"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-eqaf" ,ocaml-eqaf)
+ ("ocaml-bigarray-compat" ,ocaml-bigarray-compat)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("ocaml-ounit" ,ocaml-ounit)))
+ (synopsis "OCaml library provding cryptographic primitives")
+ (description "This OCaml library provides symmetric ciphers (DES, AES,
+RC4, ChaCha20/Poly1305), and hashes (MD5, SHA-1, SHA-2). This library can be
+used from MirageOS unikernels.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 08/31] gnu: Add ocaml-conduit-lwt.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-8-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-conduit-lwt): New variable.
---
gnu/packages/ocaml.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index efd21d56e6..6591841e33 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7485,6 +7485,24 @@ TCP and SSL/TLS connections. This allows using the same type signatures
regardless of the SSL library or platform being used.")
(license license:isc)))
+(define-public ocaml-conduit-lwt
+ (package
+ (inherit ocaml-conduit)
+ (name "ocaml-conduit-lwt")
+ (arguments `(#:package "conduit-lwt"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-sexplib" ,ocaml-sexplib)
+ ("ocaml-conduit" ,ocaml-conduit)
+ ("ocaml-lwt" ,ocaml-lwt)))
+ (synopsis "OCaml library for establishing TCP and SSL/TLS connections
+using Lwt")
+ (description "This OCaml library provides the abstractions for
+establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
+@code{ocaml-lwt}.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 07/31] gnu: Add ocaml-conduit.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-7-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-conduit): New variable.
---
gnu/packages/ocaml.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 880b4d7836..efd21d56e6 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7453,6 +7453,38 @@ C-like structures using the @code{ocaml-cstruct} library.")))
(description "This OCaml library provides functions for manipulating as
S-expressions using the @code{ocaml-sexp} library.")))
+(define-public ocaml-conduit
+ (package
+ (name "ocaml-conduit")
+ (version "4.0.0")
+ (home-page "https://github.com/mirage/ocaml-conduit")
+ (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
+ "0ipm6fkmvgsyfj5f5p057av8kykli5rh8qzw7ycdrakdk7gzvhi0"))))
+ (build-system dune-build-system)
+ (arguments `(#:package "conduit"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-sexplib" ,ocaml-sexplib)
+ ("ocaml-astring" ,ocaml-astring)
+ ("ocaml-uri" ,ocaml-uri)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-ipaddr" ,ocaml-ipaddr)
+ ("ocaml-ipaddr-sexp" ,ocaml-ipaddr-sexp)))
+ (synopsis "OCaml library for establishing TCP and SSL/TLS connections")
+ (description "This OCaml library provides an abstraction for establishing
+TCP and SSL/TLS connections. This allows using the same type signatures
+regardless of the SSL library or platform being used.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 14/31] gnu: Add ocaml-duration.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-14-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-duration): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c6cdd3a318..53c7c3cc7b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7623,6 +7623,31 @@ RC4, ChaCha20/Poly1305), and hashes (MD5, SHA-1, SHA-2). This library can be
used from MirageOS unikernels.")
(license license:isc)))
+(define-public ocaml-duration
+ (package
+ (name "ocaml-duration")
+ (version "0.1.3")
+ (home-page "https://github.com/hannesm/duration")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ka4cv9581iaa6q1k02ddrpz7f53k3wk7rpq43j1lrdm4vl2jk4w"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)))
+ (synopsis "OCaml library providing conversions between various time units")
+ (description "This OCaml library provides functions for representing a
+time duration as an usigned 64 bit integer. This can be used for conversions
+between various time units.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 09/31] gnu: Add ocaml-afl-persistent.
(address . 49867@debbugs.gnu.org)(name . Xinglu Chen)(address . public@yoctocell.xyz)
20210809070124.25641-9-pukkamustard@posteo.net
From: Xinglu Chen <public@yoctocell.xyz>

* gnu/packages/ocaml.scm (ocaml-afl-persistent): New variable.
---
gnu/packages/ocaml.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6591841e33..9cb03d94ac 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7543,6 +7543,40 @@ It makes it possible to run pure OCaml programs in JavaScript environment like
browsers and Node.js.")
(license license:lgpl2.1+)))
+(define-public ocaml-afl-persistent
+ (package
+ (name "ocaml-afl-persistent")
+ (version "1.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/stedolan/ocaml-afl-persistent")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i"))))
+ (build-system ocaml-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (invoke "./build.sh")))
+ ;; XXX: The tests are already run in the build.sh script.
+ (delete 'check))))
+ (native-inputs
+ `(("opam" ,opam)))
+ (home-page "https://github.com/stedolan/ocaml-afl-persistent")
+ (synopsis "Use afl-fuzz in persistent mode")
+ (description
+ "afl-fuzz normally works by repeatedly forking the program being tested.
+Using this package, you can run afl-fuzz in ``persistent mode'', which avoids
+repeated forking and is much faster.")
+ (license license:expat)))
+
(define-public ocaml-bibtex2html
(package
(name "ocaml-bibtex2html")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 17/31] gnu: Add ocaml-mirage-crypto-pk.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-17-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-mirage-crypto-pk): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b6cf98b82f..82786922b2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7694,6 +7694,31 @@ OCaml")
(description "@code{ocaml-mirage-crypto-rng} provides an OCaml random
number generator interface, and implementations.")))
+(define-public ocaml-mirage-crypto-pk
+ (package
+ (inherit ocaml-mirage-crypto)
+ (name "ocaml-mirage-crypto-pk")
+ (arguments `(#:package "mirage-crypto-pk"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
+ ("ocaml-mirage-crypto-rng" ,ocaml-mirage-crypto-rng)
+ ("ocaml-mtime" ,ocaml-mtime)
+ ("ocaml-sexplib" ,ocaml-sexplib)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-zarith" ,ocaml-zarith)
+ ("ocaml-eqaf" ,ocaml-eqaf)
+ ("ocaml-rresult" ,ocaml-rresult)))
+ (native-inputs
+ `(("ocaml-ounit" ,ocaml-ounit)
+ ("ocaml-randomconv" ,ocaml-randomconv)))
+ (inputs `(("gmp" ,gmp)))
+ (synopsis "OCaml library providing public-key cryptography")
+ (description "@code{ocaml-mirage-crypto-pk} provides public-key
+cryptography (RSA, DSA, DH) for OCaml.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 10/31] gnu: Add ocaml-pprint.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-10-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-pprint): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 9cb03d94ac..5a7acb4ba8 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7503,6 +7503,31 @@ establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
@code{ocaml-lwt}.")
(license license:isc)))
+(define-public ocaml-pprint
+ (package
+ (name "ocaml-pprint")
+ (version "20200410")
+ (home-page "https://github.com/fpottier/pprint")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "16xc0rd4yj1y9rrs9fbhidd08icy4pc1plx48hp0xs6vnkh1wxjm"))))
+ (build-system dune-build-system)
+ (synopsis "OCaml pretty-printing combinator library and rendering
+engine")
+ (description "This OCaml library offers a set of combinators for building
+so-called documents as well as an efficient engine for converting documents to
+a textual, fixed-width format. The engine takes care of indentation and line
+breaks, while respecting the constraints imposed by the structure of the
+document and by the text width.")
+ (license license:lgpl2.0)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 18/31] gnu: Add ocaml-ptime.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-18-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ptime): New variable.
---
gnu/packages/ocaml.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 82786922b2..7af276a517 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7719,6 +7719,45 @@ number generator interface, and implementations.")))
(description "@code{ocaml-mirage-crypto-pk} provides public-key
cryptography (RSA, DSA, DH) for OCaml.")))
+(define-public ocaml-ptime
+ (package
+ (name "ocaml-ptime")
+ (version "0.8.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://erratique.ch/software/ptime/releases/ptime-"
+ version ".tbz"))
+ (sha256
+ (base32
+ "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27"))))
+ (build-system ocaml-build-system)
+ (arguments
+ `(#:build-flags (list "build" "--with-js_of_ocaml" "false"
+ "--tests" "true")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (propagated-inputs
+ `(("ocaml-result" ,ocaml-result)))
+ (native-inputs
+ `(("ocamlbuild" ,ocamlbuild)
+ ("ocaml-topkg" ,ocaml-topkg)
+ ("opam" ,opam)))
+ (properties `((upstream-name . "ptime")))
+ (home-page "https://erratique.ch/software/ptime")
+ (synopsis "POSIX time for OCaml")
+ (description "Ptime has platform independent POSIX time support in pure
+OCaml. It provides a type to represent a well-defined range of POSIX
+timestamps with picosecond precision, conversion with date-time values,
+conversion with RFC 3339 timestamps and pretty printing to a human-readable,
+locale-independent representation.
+
+The additional Ptime_clock library provides access to a system POSIX clock and
+to the system's current time zone offset.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 11/31] gnu: Add ocaml-crowbar.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-11-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-crowbar): New variable.
---
gnu/packages/ocaml.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 5a7acb4ba8..dba715d2f5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7528,6 +7528,42 @@ breaks, while respecting the constraints imposed by the structure of the
document and by the text width.")
(license license:lgpl2.0)))
+(define-public ocaml-crowbar
+ (package
+ (name "ocaml-crowbar")
+ (version "0.2")
+ (home-page "https://github.com/stedolan/crowbar")
+ (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
+ "0wjfc9irvirfkic32ivvj6qb7r838w08b0d3vmngigbjpjyc9b14"))))
+ (build-system dune-build-system)
+ (arguments
+ ;; Tests require ocaml-xmldiff which requires OCaml 4.12.0
+ `(#:tests? #f))
+ (propagated-inputs
+ `(("ocaml-ocplib-endian" ,ocaml-ocplib-endian)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)
+ ("ocaml-afl-persistent" ,ocaml-afl-persistent)))
+ (native-inputs
+ `(("ocaml-calendar" ,ocaml-calendar)
+ ("ocaml-fpath" ,ocaml-fpath)
+ ("ocaml-uucp" ,ocaml-uucp)
+ ("ocaml-uunf" ,ocaml-uunf)
+ ("ocaml-uutf" ,ocaml-uutf)
+ ("ocaml-pprint" ,ocaml-pprint)))
+ (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
+ (description "Crowbar is a library for testing code, combining QuickCheck-style
+property-based testing and the magical bug-finding powers of
+[afl-fuzz](http://lcamtuf.coredump.cx/afl/).")
+ (license license:expat)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 12/31] gnu: Add ocaml-eqaf.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-12-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-eqaf): New variable.
---
gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index dba715d2f5..7101cc6c2f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7564,6 +7564,34 @@ property-based testing and the magical bug-finding powers of
[afl-fuzz](http://lcamtuf.coredump.cx/afl/).")
(license license:expat)))
+(define-public ocaml-eqaf
+ (package
+ (name "ocaml-eqaf")
+ (version "0.7")
+ (home-page "https://github.com/mirage/eqaf")
+ (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
+ "06hsnnjax1kb3qsi3cj0nyyz8c2hj2gbw3h517gpjinpnwy2fr85"))))
+ (build-system dune-build-system)
+ (propagated-inputs
+ ;; required to build the eqaf.cstruct library (see https://github.com/mirage/eqaf/pull/27)
+ `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
+ ("ocaml-cstruct" ,ocaml-cstruct)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)
+ ("ocaml-crowbar" ,ocaml-crowbar)))
+ (synopsis "OCaml library for constant-time equal function on string")
+ (description "This OCaml library provides an equal function on string in
+constant-time to avoid timing-attack with crypto stuff.")
+ (license license:expat)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 15/31] gnu: Add ocaml-randomconv.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-15-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-randomconv): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 53c7c3cc7b..669faf9729 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7648,6 +7648,31 @@ time duration as an usigned 64 bit integer. This can be used for conversions
between various time units.")
(license license:isc)))
+(define-public ocaml-randomconv
+ (package
+ (name "ocaml-randomconv")
+ (version "0.1.3")
+ (home-page "https://github.com/hannesm/randomconv")
+ (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
+ "0pzq2zqz5bpy2snsvmn82hg79wfd0lmbbbhmhdvc8k20km86jqy7"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)))
+ (synopsis "OCaml library for converting random byte vectors to random numer")
+ (description
+ "This Ocaml library provides functions for converting random byte vectors
+as (C-like structures using @code{ocaml-cstruct}) to OCaml native numbers.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 16/31] gnu: Add ocaml-mirage-crypto-rng.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-16-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-mirage-crypto-rng): New variable.
---
gnu/packages/ocaml.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 669faf9729..b6cf98b82f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7673,6 +7673,27 @@ between various time units.")
as (C-like structures using @code{ocaml-cstruct}) to OCaml native numbers.")
(license license:isc)))
+(define-public ocaml-mirage-crypto-rng
+ (package
+ (inherit ocaml-mirage-crypto)
+ (name "ocaml-mirage-crypto-rng")
+ (arguments `(#:package "mirage-crypto-rng"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-duration" ,ocaml-duration)
+ ("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
+ ("ocaml-mtime" ,ocaml-mtime)
+ ("ocaml-lwt" ,ocaml-lwt)))
+ (native-inputs
+ `(("ocaml-ounit" ,ocaml-ounit)
+ ("ocaml-randomconv" ,ocaml-randomconv)))
+ (synopsis "Cryptographically secure pseudo-random number generator in
+OCaml")
+ (description "@code{ocaml-mirage-crypto-rng} provides an OCaml random
+number generator interface, and implementations.")))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 22/31] gnu: Add ocaml-mirage-crypto-ec.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-22-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-mirage-crypto-ec): New variable.
---
gnu/packages/ocaml.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0a431b2563..7ef2468d9a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7853,6 +7853,40 @@ 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 ocaml-mirage-crypto-ec
+ ;; FIXME: This package contains generated code (see
+ ;; https://github.com/mirage/mirage-crypto/blob/main/ec/native/README.md). These
+ ;; should be re-generated during the build process.
+ (package
+ (inherit ocaml-mirage-crypto)
+ (name "ocaml-mirage-crypto-ec")
+ (arguments `(#:package "mirage-crypto-ec"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-eqaf" ,ocaml-eqaf)
+ ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
+ ("ocaml-mirage-crypto-rng" ,ocaml-mirage-crypto-rng)
+ ("gmp" ,gmp)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("ocaml-randomconv" ,ocaml-randomconv)
+ ("ocaml-ounit" ,ocaml-ounit)
+ ("ocaml-mirage-crypto-pk" ,ocaml-mirage-crypto-pk)
+ ("ocaml-hex" ,ocaml-hex)
+ ("ocaml-alcotest" ,ocaml-alcotest)
+ ("ocaml-asn1-combinators" ,ocaml-asn1-combinators)
+ ("ocaml-ppx-deriving-yojson" ,ocaml-ppx-deriving-yojson)
+ ("ocaml-ppx-deriving" ,ocaml-ppx-deriving)
+ ("ocaml-yojson" ,ocaml-yojson)))
+ (synopsis "OCaml library providing Elliptic Curve Cryptography")
+ (description "This OCaml library provides an implementation of key exchange
+(ECDH) and digital signature (ECDSA/EdDSA) algorithms. The curves P224
+(SECP224R1), P256 (SECP256R1), P384 (SECP384R1),P521 (SECP521R1), and 25519
+(X25519, Ed25519) are implemented by this package.")
+ ;; See https://github.com/mirage/mirage-crypto/blob/main/ec/LICENSE.md
+ (license license:expat)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 19/31] gnu: Add ocaml-asn1-combinators.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-19-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-asn1-combinators): New variable.
---
gnu/packages/ocaml.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (48 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7af276a517..de3ae3eb9d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7758,6 +7758,41 @@ The additional Ptime_clock library provides access to a system POSIX clock and
to the system's current time zone offset.")
(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
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 25/31] gnu: Add ocaml-cstruct-unix.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-25-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-cstruct-unix): New variable.
---
gnu/packages/ocaml.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index df825d1ec3..e358042e41 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3412,6 +3412,23 @@ to access C-like structures directly from OCaml. It supports both reading and
writing to these structures, and they are accessed via the Bigarray module.")
(license license:isc)))
+(define-public ocaml-cstruct-unix
+ (package
+ (inherit ocaml-cstruct)
+ (name "ocaml-cstruct-unix")
+ (build-system dune-build-system)
+ (arguments
+ `(#:package "cstruct-unix"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)))
+ (synopsis "Unix variation of the @code{ocaml-cstruct} library")
+ (description "Cstruct is a library and syntax extension to make it easier
+to access C-like structures directly from OCaml. It supports both reading and
+writing to these structures, and they are accessed via the `Bigarray`
+module.")
+ (license license:isc)))
+
(define-public ocaml-hex
(package
(name "ocaml-hex")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 20/31] gnu: Add ocaml-ppx-deriving.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-20-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ppx-deriving): New variable.
---
gnu/packages/ocaml.scm | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index de3ae3eb9d..92562d1c3a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4523,7 +4523,38 @@ speedup, polymorphic variants and optional syntax for tuples and variants.
yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
serializers and deserializers from type definitions.")
(license license:bsd-3)))
-
+
+(define-public ocaml-ppx-deriving
+ (package
+ (name "ocaml-ppx-deriving")
+ (version "5.2.1")
+ (home-page "https://github.com/ocaml-ppx/ppx_deriving")
+ (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
+ "1wqcnw4wi6pfjjhixpakckm03dpj990259za432804471a6spm2j"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
+ ("ocaml-ppxlib" ,ocaml-ppxlib)
+ ("ocaml-result" ,ocaml-result)))
+ (native-inputs
+ `(("ocaml-cppo" ,ocaml-cppo)
+ ("ocaml-ounit2" ,ocaml-ounit2)))
+ (properties `((upstream-name . "ppx_deriving")))
+ (synopsis "Type-driven code generation for OCaml")
+ (description "This OCaml library provides common infrastructure for
+generating code based on type definitions, and a set of useful plugins for
+common tasks.")
+ (license license:expat)))
+
(define-public ocaml-craml
(package
(name "ocaml-craml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 21/31] gnu: Add ocaml-ppx-deriving-yojson.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-21-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ppx-deriving-yojson): New variable.
---
gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 92562d1c3a..0a431b2563 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4555,6 +4555,35 @@ generating code based on type definitions, and a set of useful plugins for
common tasks.")
(license license:expat)))
+(define-public ocaml-ppx-deriving-yojson
+ (package
+ (name "ocaml-ppx-deriving-yojson")
+ (version "3.6.1")
+ (home-page "https://github.com/ocaml-ppx/ppx_deriving_yojson")
+ (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
+ "1icz5h6p3pfj7my5gi7wxpflrb8c902dqa17f9w424njilnpyrbk"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-yojson" ,ocaml-yojson)
+ ("ocaml-result" ,ocaml-result)
+ ("ocaml-ppx-deriving" ,ocaml-ppx-deriving)
+ ("ocaml-ppxlib" ,ocaml-ppxlib)))
+ (native-inputs `(("ocaml-ounit" ,ocaml-ounit)))
+ (properties `((upstream-name . "ppx_deriving_yojson")))
+ (synopsis "JSON codec generator for OCaml")
+ (description "@code{ocaml-ppx-deriving-yojson} is an OCaml ppx_deriving
+plugin that provides a JSON codec generator.")
+ (license license:expat)))
+
(define-public ocaml-craml
(package
(name "ocaml-craml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 28/31] gnu: Add ocaml-lwt-ssl.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-28-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-lwt-ssl): New variable.
---
gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b3becac967..3a0cc08c1e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7580,6 +7580,32 @@ establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
@code{ocaml-lwt}.")
(license license:isc)))
+(define-public ocaml-lwt-ssl
+ (package
+ (name "ocaml-lwt-ssl")
+ (version "1.1.3")
+ (home-page "https://github.com/ocsigen/lwt_ssl")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0v417ch5zn0yknj156awa5mrq3mal08pbrvsyribbn63ix6f9y3p"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-ssl" ,ocaml-ssl)))
+ (properties `((upstream-name . "lwt_ssl")))
+ (synopsis "OpenSSL binding for OCaml with concurrent I/O")
+ (description "This OCaml library provides an Lwt-enabled wrapper around
+@code{ocaml-ssl}, that performs I/O concurrently.")
+ (license license:lgpl2.1+))) ; with linking exception
+
(define-public ocaml-pprint
(package
(name "ocaml-pprint")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 23/31] gnu: Add ocaml-gmap.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-23-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-gmap): New variable.
---
gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7ef2468d9a..d37a40d22e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7887,6 +7887,32 @@ The only ASN.1 encodings currently supported are BER and DER.")
;; See https://github.com/mirage/mirage-crypto/blob/main/ec/LICENSE.md
(license license:expat)))
+(define-public ocaml-gmap
+ (package
+ (name "ocaml-gmap")
+ (version "0.3.0")
+ (home-page "https://github.com/hannesm/gmap")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0880mhcybr662k6wnahx5mwbialh878kkzxacn47qniadd21x411"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)
+ ("ocaml-fmt" ,ocaml-fmt)))
+ (synopsis "OCaml library for heterogenous maps over a Generalized
+Algebraic Data Type")
+ (description "@code{ocaml-gmap} exposes an OCaml functor which can be used
+to create a type-safe heterogenous maps.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 24/31] gnu: Add ocaml-pbkdf.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-24-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-pbkdf): New variable.
---
gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d37a40d22e..df825d1ec3 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7913,6 +7913,32 @@ Algebraic Data Type")
to create a type-safe heterogenous maps.")
(license license:isc)))
+(define-public ocaml-pbkdf
+ (package
+ (name "ocaml-pbkdf")
+ (version "1.1.0")
+ (home-page "https://github.com/abeaumont/ocaml-pbkdf")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0scq1i7hiy8dgjdfrcaca3k7wzys35k1g2cdg7v4kfdqr6q1scb3"))))
+ (build-system dune-build-system)
+ (propagated-inputs
+ `(("ocaml-mirage-crypto" ,ocaml-mirage-crypto)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)))
+ (synopsis "OCaml library for password based key derivation functions
+(PBKDF) from PKCS#5")
+ (description "This package provides an OCaml implementation of PBKDF 1 and
+2 as defined by PKCS#5 using @code{ocaml-mirage-crypto}.")
+ (license license:bsd-2)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 26/31] gnu: Add ocaml-x509.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-26-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-x509): New variable.
---
gnu/packages/ocaml.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e358042e41..b7bdc8c711 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7956,6 +7956,52 @@ to create a type-safe heterogenous maps.")
2 as defined by PKCS#5 using @code{ocaml-mirage-crypto}.")
(license license:bsd-2)))
+(define-public ocaml-x509
+ (package
+ (name "ocaml-x509")
+ (version "0.14.0")
+ (home-page "https://github.com/mirleft/ocaml-x509")
+ (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
+ "0b51vzyxxkhwgx12dg55clb1lb971cxlmsk4wlxzs5h115j5hcy7"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-asn1-combinators" ,ocaml-asn1-combinators)
+ ("ocaml-ptime" ,ocaml-ptime)
+ ("ocaml-base64" ,ocaml-base64)
+ ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
+ ("ocaml-mirage-crypto-pk" ,ocaml-mirage-crypto-pk)
+ ("ocaml-mirage-crypto-ec" ,ocaml-mirage-crypto-ec)
+ ("ocaml-mirage-crypto-rng" ,ocaml-mirage-crypto-rng)
+ ("ocaml-rresult" ,ocaml-rresult)
+ ("ocaml-fmt" ,ocaml-fmt)
+ ("ocaml-gmap" ,ocaml-gmap)
+ ("ocaml-domain-name" ,ocaml-domain-name)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-pbkdf" ,ocaml-pbkdf)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)
+ ("ocaml-cstruct-unix" ,ocaml-cstruct-unix)))
+ (synopsis "Public Key Infrastructure (RFC 5280, PKCS) purely in OCaml")
+(description "X.509 is a public key infrastructure used mostly on the
+Internet. It consists of certificates which include public keys and
+identifiers, signed by an authority. Authorities must be exchanged over a
+second channel to establish the trust relationship. This OCaml library
+implements most parts of RFC5280 and RFC6125. The Public Key Cryptography
+Standards (PKCS) defines encoding and decoding (in ASN.1 DER and PEM format),
+which is also implemented by this library --- namely PKCS 1, PKCS 5, PKCS 7,
+PKCS 8, PKCS 9, PKCS 10, and PKCS 12.")
+ (license license:bsd-2)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 27/31] gnu: Add ocaml-ca-certs.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-27-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-ca-certs): New variable.
---
gnu/packages/ocaml.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b7bdc8c711..b3becac967 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -8002,6 +8002,44 @@ which is also implemented by this library --- namely PKCS 1, PKCS 5, PKCS 7,
PKCS 8, PKCS 9, PKCS 10, and PKCS 12.")
(license license:bsd-2)))
+(define-public ocaml-ca-certs
+ (package
+ (name "ocaml-ca-certs")
+ (version "0.2.1")
+ (home-page "https://github.com/mirage/ca-certs")
+ (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
+ "0qkxdrqyah24fz80hwkycdj50nybfjfz9b04qscv01r2ifb0kqy5"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."
+ ;; Tests are failing as they require certificates to be in /etc/ssl/certs
+ #:tests? #f))
+ (propagated-inputs
+ `(("ocaml-astring" ,ocaml-astring)
+ ("ocaml-bos" ,ocaml-bos)
+ ("ocaml-fpath" ,ocaml-fpath)
+ ("ocaml-rresult" ,ocaml-rresult)
+ ("ocaml-ptime" ,ocaml-ptime)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-mirage-crypto" ,ocaml-mirage-crypto)
+ ("ocaml-x509" ,ocaml-x509)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)))
+ (synopsis
+ "Detect root CA certificates from the operating system")
+ (description
+ "TLS requires a set of root anchors (Certificate Authorities) to
+authenticate servers. This library exposes this list so that it can be
+registered with ocaml-tls.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 29/31] gnu: Add ocaml-conduit-lwt-unix.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-29-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-conduit-lwt-unix): New variable.
---
gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3a0cc08c1e..b35994231d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7606,6 +7606,32 @@ establishing TCP and SSL/TLS connections from @code{ocaml-conduit} using
@code{ocaml-ssl}, that performs I/O concurrently.")
(license license:lgpl2.1+))) ; with linking exception
+(define-public ocaml-conduit-lwt-unix
+ (package
+ (inherit ocaml-conduit)
+ (name "ocaml-conduit-lwt-unix")
+ (arguments `(#:package "conduit-lwt-unix"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-logs" ,ocaml-logs)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-conduit-lwt" ,ocaml-conduit-lwt)
+ ("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-uri" ,ocaml-uri)
+ ("ocaml-ipaddr" ,ocaml-ipaddr)
+ ("ocaml-ipaddr-sexp" ,ocaml-ipaddr-sexp)
+ ("ocaml-ca-certs" ,ocaml-ca-certs)))
+ (native-inputs
+ `(("ocaml-lwt-log" ,ocaml-lwt-log)
+ ("ocaml-ssl" ,ocaml-ssl)
+ ("ocaml-lwt-ssl" ,ocaml-lwt-ssl)))
+ (synopsis "OCaml library for establishing TCP and SSL/TLC connections
+using Lwt_unix")
+ (description "This OCaml library provides an implementation
+for establishing TCP and SSL/TLS connections for the @code{ocaml-conduit}
+signatures using Lwt_unix.")
+ (license license:isc)))
+
(define-public ocaml-pprint
(package
(name "ocaml-pprint")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 30/31] gnu: Add ocaml-magic-mime.
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-30-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-magic-mime): New variable.
---
gnu/packages/ocaml.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b35994231d..42e6fd2e94 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7424,6 +7424,31 @@ JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
version of the library. All of these implementations share the same IO logic
from this module.")))
+(define-public ocaml-magic-mime
+ (package
+ (name "ocaml-magic-mime")
+ (version "1.2.0")
+ (home-page "https://github.com/mirage/ocaml-magic-mime")
+ (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
+ "1pmwxw5n0lxbp7b9z1wplkn0cfl816cbacx3cdj2912n5zyjpjnk"))))
+ (build-system dune-build-system)
+ (arguments `(#:test-target "."))
+ (synopsis "OCaml library for mapping filenames to common MIME types")
+ (description "This library contains a database of MIME types that maps
+filename extensions into MIME types suitable for use in many Internet
+protocols such as HTTP or e-mail. It is generated from the @file{mime.types}
+file found in Unix systems, but has no dependency on a filesystem since it
+includes the contents of the database as an ML datastructure.")
+ (license license:isc)))
+
(define-public ocaml-domain-name
(package
(name "ocaml-domain-name")
--
2.32.0
P
P
pukkamustard wrote on 9 Aug 2021 09:01
[PATCH v2 31/31] gnu: Add ocaml-cohttp-lwt-unix
(address . 49867@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
20210809070124.25641-31-pukkamustard@posteo.net
* gnu/packages/ocaml.scm (ocaml-cohttp-lwt-unix): New variable.
---
gnu/packages/ocaml.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 42e6fd2e94..8965f5920d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7424,6 +7424,29 @@ JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
version of the library. All of these implementations share the same IO logic
from this module.")))
+(define-public ocaml-cohttp-lwt-unix
+ (package
+ (inherit ocaml-cohttp)
+ (name "ocaml-cohttp-lwt-unix")
+ (arguments `(#:package "cohttp-lwt-unix"
+ ;; tests require network
+ #:tests? #f))
+ (propagated-inputs
+ `(("ocaml-conduit-lwt" ,ocaml-conduit-lwt)
+ ("ocaml-conduit-lwt-unix" ,ocaml-conduit-lwt-unix)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)
+ ("ocaml-magic-mime" ,ocaml-magic-mime)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-fmt" ,ocaml-fmt)
+ ("ocaml-cohttp-lwt" ,ocaml-cohttp-lwt)
+ ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+ ("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-lwt-ssl" ,ocaml-lwt-ssl)))
+ (native-inputs `(("ocaml-ounit" ,ocaml-ounit)))
+ (synopsis "OCaml HTTP implementation for Unix using Lwt")
+ (description "This Ocaml package provides an implementation of an HTTP
+client and server for Unix using the Lwt concurrency library.")))
+
(define-public ocaml-magic-mime
(package
(name "ocaml-magic-mime")
--
2.32.0
X
X
Xinglu Chen wrote on 9 Aug 2021 11:30
Re: [bug#49867] [PATCH 24/29] gnu: Add ocaml-ca-certs.
(name . pukkamustard)(address . pukkamustard@posteo.net)(address . 49867@debbugs.gnu.org)
87tujzoth1.fsf@yoctocell.xyz
On Sun, Aug 08 2021, pukkamustard wrote:

Toggle quote (47 lines)
> Xinglu Chen <public@yoctocell.xyz> writes:
>
>>> + ;; Tests are failing as they require
>>> certificates to be in /etc/ssl/certs
>>> + #:tests? #f))
>>
>> The same issue has been mentioned by NixOS people on their bug
>> tracker[1], they solved[2] it by reading the NIX_SSL_CERT_FILE
>> environment variable, which automatically gets set in the build
>> environment if the ‘cacert’ package is specified as an input. I
>> don’t
>> know if Guix does something similar.
>>
>> [1]: <https://github.com/mirage/ca-certs/issues/16>
>> [2]: <https://github.com/mirage/ca-certs/pull/17>
>>
>
> Thanks for the pointers.
>
> Inspired by the package definition for curl, I tried setting
> NIX_SSL_CERT_FILE with native-search-paths:
>
> ```
> (native-search-paths
> (list
> (search-path-specification
> (variable "NIX_SSL_CERT_FILE")
> (file-type 'regular)
> (separator #f) ;single entry
> (files '("/etc/ssl/certs/ca-certificates.crt")))))
> ```
>
> and adding `nss-certs` to the native-inputs.
>
> However, this does not work. Some observations/questions:
>
> - The NIX_SSL_CERT_FILE does not appear in the
> `environment-variables` file when running `guix build -K`. I
> would have expected it to be set there.
> - `nss-certs` does not provide the `ca-certificates.crt` file. It
> is built when creating a profile with the
> `ca-certificate-bundle` hook. Is this run when creating a build
> environment?
>
> I seem to be not understanding a lot of things about the build
> environment ... Pointers very welcome!

Maybe the environment variables in ‘native-search-paths’ are only set if
the package is installed in a profile (in ~/.guix-profile/etc/profile)?

I don’t think profile hooks are run in the build environment, so that’s
probably why.

In Nix, the bundle is created during the build phase[1], not sure if we
should do this too.

I think it’s fine to disable tests for now, but it would be great to see
what other people think too.

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEQ9csVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5fV4P/3AHvdhEEaCLNezGIqe9dO/GkG6E
p0mnINAMOabkpZPb7AWNC/1UQyNuHXQJZu17fPyRt51DESQIWeYrcnTQRmxNRh4z
dClCw1ejD7qOcOTHodrt9vghOZ5ZfKe5qs4HLzniL8GHb3mE1NYL+cPXd+/bHIu2
iT/TVk52wJcXoYVwPJyyw9scf8oPF/PWkszk24ZVgDsd8R4DQ5rvGVgYM0+slr7K
YyFmbjT9sxMk5Hjcpm8xAbWcurbsej3LXO1B7IrGMjitLnT2Ecd/7mymapkKu8HK
IOIcwpCYOGQMhq6TES3h1njdi5puv75+l+nXxmt5yLxtz0+1NQvtXLYn9FNVLKtH
JkBMiQxlEff4N+9Q1CwmMGipKT0EzIUijoyU1DVfiEDt7EYVDQcqT3jyeMLvGNJi
qARUo8rry825iLaJhF/9olcXTMscMj3gCqfAvxyTiR9bFEIRppRjzemAWqU0hkrR
d4bu6MdBYxqdaBs7JSBTiFxo9oi7hU6mA7UusKi65kpORx9B/ACXTcUjXO6Aw8es
Oh51f/eWkwXQitHM2yjCpnXEbtujHZVv/VJiOWnpu6V4i1DAq5Lfn575xSlp4YeX
GO/n5l2TLJQ07yiEsUnTG6D8lPYM2T/QlefiUSdeRvsFpmytnhzEldB51V/5LQGa
BZoqgwqdaN/HLvEz
=GU+q
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 9 Aug 2021 11:51
Re: [bug#49867] [PATCH v2 11/31] gnu: Add ocaml-crowbar.
(name . pukkamustard)(address . pukkamustard@posteo.net)
87mtprosht.fsf@yoctocell.xyz
On Mon, Aug 09 2021, pukkamustard wrote:

Toggle quote (41 lines)
> * gnu/packages/ocaml.scm (ocaml-crowbar): New variable.
> ---
> gnu/packages/ocaml.scm | 36 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 5a7acb4ba8..dba715d2f5 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -7528,6 +7528,42 @@ breaks, while respecting the constraints imposed by the structure of the
> document and by the text width.")
> (license license:lgpl2.0)))
>
> +(define-public ocaml-crowbar
> + (package
> + (name "ocaml-crowbar")
> + (version "0.2")
> + (home-page "https://github.com/stedolan/crowbar")
> + (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
> + "0wjfc9irvirfkic32ivvj6qb7r838w08b0d3vmngigbjpjyc9b14"))))
> + (build-system dune-build-system)
> + (arguments
> + ;; Tests require ocaml-xmldiff which requires OCaml 4.12.0
> + `(#:tests? #f))
> + (propagated-inputs
> + `(("ocaml-ocplib-endian" ,ocaml-ocplib-endian)
> + ("ocaml-cmdliner" ,ocaml-cmdliner)
> + ("ocaml-afl-persistent" ,ocaml-afl-persistent)))
> + (native-inputs
> + `(("ocaml-calendar" ,ocaml-calendar)
> + ("ocaml-fpath" ,ocaml-fpath)
> + ("ocaml-uucp" ,ocaml-uucp)

The ‘ocaml-uucp’ package hasn’t been packaged yet.

Toggle quote (8 lines)
> + ("ocaml-uunf" ,ocaml-uunf)
> + ("ocaml-uutf" ,ocaml-uutf)
> + ("ocaml-pprint" ,ocaml-pprint)))
> + (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
> + (description "Crowbar is a library for testing code, combining QuickCheck-style
> +property-based testing and the magical bug-finding powers of
> +[afl-fuzz](http://lcamtuf.coredump.cx/afl/).")

Texinfo formatting:


The rest of v2 looks good. :-)
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEQ+r4VHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5aUgP/jhCGyp/HT/iDQYlipsjA8HGpGuM
a2BwzAdkutmnf7omjoB6KI3TkT+87HPU+mEUfVENmyZ5IXruVC+HboFCjiewmnLU
ihSVcyu5T76knL1R1+hXxkmbNCS/S+PLdqvKZyPPjELeQhYEldQf1rO3ew3AeaTX
oidhyfDX447jcNZC793GuF60ewh3ZYCEGcdlNQFtwu5D5cXvXXBBqW/1TAvVTaHB
s6SNYbu2Srr1uAiYzOyWbKGt/bHkdOXirL28THqyVvp6Q7wqmRsUyqtn6oEXGXA/
VXPyF9Bt1Y+BkFqrXPpxw7lblBylqFfWA/hT2xzGIeMsFBz/8QWfvNARdxgW3w0q
j2N4rqPD0VrkISjZ5IdqaGocn3lxz0vcp/WmNAf5kPz7iAuBeik0EFxRgIre4GXz
saT5kEqIBG6mt2ykJsDC+F3bzJhcjCTiutC8QxHNllsw/uPeHV71Rl5WyXJtd46Y
eJmaiAULvcVt3Zy/c2eqry7IvM1I40pf79txkIIB1T3J8mnFTDlyctWkos/GoYan
CvI6OvUjzerW0XHf/rp+VmNNbn3HZKrhCmGwU0JeRIZPNuAPGfizCewJr0k0BaUQ
EbE+9iWpwzYomHlf5+F4N/z/S1ESMsTzJosQTBSf2it27z4pmtG5/Q9ndgdUvutA
Q93b7fAFLsHyKSSm
=B0R/
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 9 Aug 2021 11:53
Re: [bug#49867] [PATCH 21/29] gnu: Add ocaml-pbkdf.
(name . pukkamustard)(address . pukkamustard@posteo.net)(address . 49867@debbugs.gnu.org)
87k0kvosfn.fsf@yoctocell.xyz
On Sun, Aug 08 2021, pukkamustard wrote:

Toggle quote (18 lines)
> Xinglu Chen <public@yoctocell.xyz> writes:
>
>>> + (description "An OCaml implementation of PBKDF 1 and 2 as
>>> defined by
>>> +PKCS#5 using @code{ocaml-mirage-crypto}.")
>>
>> The description should contain full sentences, maybe
>>
>> "This package provides an OCaml implementation of …"
>
> Changed to: "This package provides an OCaml implementation of
> PBKDF 1 and 2 as defined by PKCS#5 using
> @code{ocaml-mirage-crypto}."
>
> Note: A version 1.2.0 was released recently. However, it requires
> CStruct 6.0.0. I will submit a patch to update ocaml-cstruct and
> then ocaml-pbkdf can be updated to 1.2.0.

Cool, sounds good.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEQ+wwVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5EzYP/RCnzgWGURXHGdLGrE4/+t/STxtd
Z6b8652aHjqLPitF++18WROrbihq8ewDkpO5Y1KhgHgoWJxAIRqIg/nkcNU4D14c
+lUxfasHt+g1VCEM8u/tgusFr4bA7/YsXY+XTrjZw+BNNbM0ITgkwgRriAL9YjYZ
v7jmxY0otYJNMsejocBoHtk0nEVbdfO+RL4uE3BQBFtZ0n6Ty7YvAtdA49DCXIhJ
TzNQqSI7HRgC7cIJilsWQVXKZ28ZASSh0MPNjsf9Ol5iF22f58hxmQ7zYxP1k+pv
LIONGK9c9fddBCAE1rQv89PorzzQZMIN2MoLMVMs19YXdi18NG5wb4/wJ3hG3SEi
13R3AGt86CuYamQzVKQTwW1eiQtoOBCwljDeSWJJ92KO7AeNBRwJ/mPz1RUCcmuS
c4XrdJUeNQX5q18mOENjfPSUBjTazSXuH4Nn8E1B2Ysq0s19GcRKNTG6gLJQG+51
DE+o6gm6Sf+dZ4ZrOr3aXbd8O6XE82lkUB6ha5bH1GE+wfa9/roESH3rct7uW3n7
ARqngvzDFbM6wRA3Om/xarmw3FRwkn1M3DL4HYxsl3Dn16+ty88PUe7Pt/kCjKvd
Qwbij6fHxOzhro/iGUtLELmwYU8M8Hdm3uV+D4vAB07E91u0vgkAonH3jkFQHcuS
k2S4VYnMtEaFBuOB
=Dy/m
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 9 Aug 2021 11:55
Re: [bug#49867] [PATCH 00/29] gnu: Add ocaml-cohttp-lwt-unix.
(name . pukkamustard)(address . pukkamustard@posteo.net)(address . 49867@debbugs.gnu.org)
87im0foscf.fsf@yoctocell.xyz
On Mon, Aug 09 2021, pukkamustard wrote:

Toggle quote (20 lines)
> Xinglu Chen <public@yoctocell.xyz> writes:
>
>> I managed to package ‘ocaml-afl-persistent’ with the attached
>> patch,
>> but it doesn’t respect the ‘--without-tests’ transformation
>> since the
>> tests are run as part of the build phase.
>
> Fantastic! With your patch I've added ocaml-crowbar and enabled
> tests for ocaml-eqaf in V2.
>
> Tests for ocaml-crowbar are currently disabled as they require
> ocaml-xmldiff which requires OCaml 4.12.0.
>
>> Thanks for working on this!
>
> Thank you for your comments!
>
> V2 follows.

Great, thank you for the update!

I noticed that the ‘ocaml-uucp’ package, which is an input for ‘ocaml-crowbar’, is
missing. Otherwise v2 LGTM!
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEQ+4AVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5s4MQAInjlxdXVXHWJUUZ89E6SH5l98wl
lgkySaBA4HPJwWt+cehSFtayfxvnBbhSb2+CTR5VmbS42NQ9gdnW3dC3jOH6i7jF
gU08LXu2Og3GI2aTEBUsSiIYWFOyc3nPrtlHVF6AS5PMtToYgr3zvV7cxPVO3BKC
5zF4auIsDAcXtopfLjeabqsRrq9uIVjroEKYc3MBJm8XjK70g0mUiTZctTllyMSM
W4WhceIBxF+7tE7c3UWTxufDt8nc3G2zUXhG9WujFPidyL255EKJ0G1P+AZFQYRJ
lPPRip3qIEPE7zw9D08Xo5h4LBKo3qzdtwwZ5hCmUvLN6PozZZdgX6kxjG2hbSC9
3R+v1LiqujaTxPCoeZPsCVIgonn5EJf+qdUx+H0qgJ79efjYmOOBZeI3qs6P6rjN
26P8ea27OzWg7gOufqh6Eq1uqOgSby2CKW+kiIMPsLCkajDpWHYCECgEqIyoUmDL
dste8DCgVCHTGz3QnMq2V2KU+XjNovjLVLauwg8zb++Wd96QmC8QvH/gttxJTqNf
ujrh925OZZFYHiwpDzPCIIMenACYv8VXW6PIkYFElegyDWabQGBKLDir/SGWMJdT
/JgHkpuFv+5cthq/RkG/W/sONX7dj5hnLGv5/4B15HfD2iTbIHJCRuilhlQkzE/J
adEV4M5Hmr7LHJO5
=bAvo
-----END PGP SIGNATURE-----

J
J
Julien Lepiller wrote on 9 Aug 2021 13:13
Re: [bug#49867] [PATCH v2 11/31] gnu: Add ocaml-crowbar.
446ED7A8-F897-42F2-8F6C-B929D1826C1C@lepiller.eu
Le 9 août 2021 05:51:58 GMT-04:00, Xinglu Chen <public@yoctocell.xyz> a écrit :
Toggle quote (45 lines)
>On Mon, Aug 09 2021, pukkamustard wrote:
>
>> * gnu/packages/ocaml.scm (ocaml-crowbar): New variable.
>> ---
>> gnu/packages/ocaml.scm | 36 ++++++++++++++++++++++++++++++++++++
>> 1 file changed, 36 insertions(+)
>>
>> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>> index 5a7acb4ba8..dba715d2f5 100644
>> --- a/gnu/packages/ocaml.scm
>> +++ b/gnu/packages/ocaml.scm
>> @@ -7528,6 +7528,42 @@ breaks, while respecting the constraints imposed by the structure of the
>> document and by the text width.")
>> (license license:lgpl2.0)))
>>
>> +(define-public ocaml-crowbar
>> + (package
>> + (name "ocaml-crowbar")
>> + (version "0.2")
>> + (home-page "https://github.com/stedolan/crowbar")
>> + (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
>> + "0wjfc9irvirfkic32ivvj6qb7r838w08b0d3vmngigbjpjyc9b14"))))
>> + (build-system dune-build-system)
>> + (arguments
>> + ;; Tests require ocaml-xmldiff which requires OCaml 4.12.0
>> + `(#:tests? #f))
>> + (propagated-inputs
>> + `(("ocaml-ocplib-endian" ,ocaml-ocplib-endian)
>> + ("ocaml-cmdliner" ,ocaml-cmdliner)
>> + ("ocaml-afl-persistent" ,ocaml-afl-persistent)))
>> + (native-inputs
>> + `(("ocaml-calendar" ,ocaml-calendar)
>> + ("ocaml-fpath" ,ocaml-fpath)
>> + ("ocaml-uucp" ,ocaml-uucp)
>
>The ‘ocaml-uucp’ package hasn’t been packaged yet.

It has, I just pushed it yesterday :)

Toggle quote (15 lines)
>
>> + ("ocaml-uunf" ,ocaml-uunf)
>> + ("ocaml-uutf" ,ocaml-uutf)
>> + ("ocaml-pprint" ,ocaml-pprint)))
>> + (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
>> + (description "Crowbar is a library for testing code, combining QuickCheck-style
>> +property-based testing and the magical bug-finding powers of
>> +[afl-fuzz](http://lcamtuf.coredump.cx/afl/).")
>
>Texinfo formatting:
>
> @uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}
>
>The rest of v2 looks good. :-)
>
X
X
Xinglu Chen wrote on 9 Aug 2021 14:39
87bl66pzau.fsf@yoctocell.xyz
On Mon, Aug 09 2021, Julien Lepiller wrote:

Toggle quote (48 lines)
> Le 9 août 2021 05:51:58 GMT-04:00, Xinglu Chen <public@yoctocell.xyz> a écrit :
>>On Mon, Aug 09 2021, pukkamustard wrote:
>>
>>> * gnu/packages/ocaml.scm (ocaml-crowbar): New variable.
>>> ---
>>> gnu/packages/ocaml.scm | 36 ++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 36 insertions(+)
>>>
>>> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>>> index 5a7acb4ba8..dba715d2f5 100644
>>> --- a/gnu/packages/ocaml.scm
>>> +++ b/gnu/packages/ocaml.scm
>>> @@ -7528,6 +7528,42 @@ breaks, while respecting the constraints imposed by the structure of the
>>> document and by the text width.")
>>> (license license:lgpl2.0)))
>>>
>>> +(define-public ocaml-crowbar
>>> + (package
>>> + (name "ocaml-crowbar")
>>> + (version "0.2")
>>> + (home-page "https://github.com/stedolan/crowbar")
>>> + (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
>>> + "0wjfc9irvirfkic32ivvj6qb7r838w08b0d3vmngigbjpjyc9b14"))))
>>> + (build-system dune-build-system)
>>> + (arguments
>>> + ;; Tests require ocaml-xmldiff which requires OCaml 4.12.0
>>> + `(#:tests? #f))
>>> + (propagated-inputs
>>> + `(("ocaml-ocplib-endian" ,ocaml-ocplib-endian)
>>> + ("ocaml-cmdliner" ,ocaml-cmdliner)
>>> + ("ocaml-afl-persistent" ,ocaml-afl-persistent)))
>>> + (native-inputs
>>> + `(("ocaml-calendar" ,ocaml-calendar)
>>> + ("ocaml-fpath" ,ocaml-fpath)
>>> + ("ocaml-uucp" ,ocaml-uucp)
>>
>>The ‘ocaml-uucp’ package hasn’t been packaged yet.
>
> It has, I just pushed it yesterday :)

Ah, forgot to pull :-)
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmERIgkVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5EmIQAJ7woMB4TZyt1juVC1+zF/VN0/yX
Oq1EdN0R1fgvuGwqfAQ8kNnIf6uNnKMqbrtUbdC5iq37aIkSemu+moIKc/Y90WI7
Cut8SZTHCjZf+ibW2RuXq2HgeSzeG/41lIeNTpNrqA6vHjHuuaXqN+RFZIbt98O2
Q3finRzIAVc50ARl/Fq5wxlLYjW4dhqm8f5t/DF4uo4d+jItlJPBO1nS6S1FkhP+
XslNRwAokkAO7FxhPV3sVm5UJWNR8/ldXgRu0OXoYNOokJXBFWw3GbgB1M2SFdJg
KrBY+NKd6sxzp7mfuT1AegneyULeQPgXDJJ89PSb/UGFnKby1r+b70v/x+ws985S
YgjkZGbyQgEfugh/46Wb3thDcTzXx1Qun7LzGKDoiv5lYVW8TOeVl2oAT8mr19x8
6lS0HwXiR1nqAjC6SwsBRkF1cfa7RN2px1HtImj/Qy1K4KWCiGHnGlyJhzFyzH2U
wCygOUh/i2MXqf0bFmlwBzoz8hRKK1iLOx6HqN3ryjRGMcHNoeGrmLVaCXqXqpWV
g5WUQq59Mrd6teYp/cYegXe7ZLfmVtT77zLWa39aridM2L1U8ysHiWtZ7tFo/MQh
3JXmxe31P/JYhgWpMzLv4FvHEQ6QSq6CsU71RS0n7QcLCO3ozfNbYJrVs7SjMFCn
7V5L8fMHICY4shpy
=mO+W
-----END PGP SIGNATURE-----

P
P
pukkamustard wrote on 10 Aug 2021 10:00
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 49867@debbugs.gnu.org)
86bl65u3t6.fsf@posteo.net
Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (7 lines)
>
> Texinfo formatting:
>
> @uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}
>
> The rest of v2 looks good. :-)

D'oh! Thanks!

The fixed patch is attached. I can also send the entire series
again as v3 if that is easier...
From c573ec927e8fd6ed99a05b3995144ff1c0cfb0b3 Mon Sep 17 00:00:00 2001
From: pukkamustard <pukkamustard@posteo.net>
Date: Mon, 9 Aug 2021 08:06:12 +0200
Subject: [PATCH v3 11/31] gnu: Add ocaml-crowbar.

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

Toggle diff (49 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 5a7acb4ba8..3c7a40d923 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7528,6 +7528,42 @@ breaks, while respecting the constraints imposed by the structure of the
document and by the text width.")
(license license:lgpl2.0)))
+(define-public ocaml-crowbar
+ (package
+ (name "ocaml-crowbar")
+ (version "0.2")
+ (home-page "https://github.com/stedolan/crowbar")
+ (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
+ "0wjfc9irvirfkic32ivvj6qb7r838w08b0d3vmngigbjpjyc9b14"))))
+ (build-system dune-build-system)
+ (arguments
+ ;; Tests require ocaml-xmldiff which requires OCaml 4.12.0
+ `(#:tests? #f))
+ (propagated-inputs
+ `(("ocaml-ocplib-endian" ,ocaml-ocplib-endian)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)
+ ("ocaml-afl-persistent" ,ocaml-afl-persistent)))
+ (native-inputs
+ `(("ocaml-calendar" ,ocaml-calendar)
+ ("ocaml-fpath" ,ocaml-fpath)
+ ("ocaml-uucp" ,ocaml-uucp)
+ ("ocaml-uunf" ,ocaml-uunf)
+ ("ocaml-uutf" ,ocaml-uutf)
+ ("ocaml-pprint" ,ocaml-pprint)))
+ (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
+ (description "Crowbar is a library for testing code, combining
+QuickCheck-style property-based testing and the magical bug-finding powers of
+@uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}.")
+ (license license:expat)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.32.0
X
X
Xinglu Chen wrote on 10 Aug 2021 14:04
(name . pukkamustard)(address . pukkamustard@posteo.net)(address . 49867@debbugs.gnu.org)
87lf59o69n.fsf@yoctocell.xyz
On Tue, Aug 10 2021, pukkamustard wrote:

Toggle quote (14 lines)
> Xinglu Chen <public@yoctocell.xyz> writes:
>
>>
>> Texinfo formatting:
>>
>> @uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}
>>
>> The rest of v2 looks good. :-)
>
> D'oh! Thanks!
>
> The fixed patch is attached. I can also send the entire series
> again as v3 if that is easier...

The patch looks good, but I don’t have commit access, so you will have
to wait for someone else to merge it. :-)
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmESa0QVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5jeAP+wWwLN6/PesIf/76RJVbY7Z0a95j
xt+R6aEcTRrJ8Cd/t29Nzmy9zdjQ2PPvsoFE8hoHJ9FspLskGCFfQKhd0oTB1ZwH
cyJoOLJ6xEldK7seOaHvXxcjI/nwIY0TsaTwHGCVgSeJ5eQ66DAt6k6oxiX4q2j5
JpUKh+x2KBt0igXYsf7bVAZvkWI0tM2v6hOgiuZ9oiDaNw5bjx3KAfTi+rM3K72k
BnpWvPx348YRR4d7s08msdMB+Dq03AI0F9YwjkT9/fpp7nJX5IjhHc6ui/GJPr4p
zLw9UaO8EZte0MyX9MM7y3+TesASyumFLOMHG3lS6EUERCJQIQppksupobx6HYsk
JdmzEvWhzEPXubm45EidZQWgAwtJ0jCzD1iTT4+XtxZKPlpCMw8d2ujzbI/bV5tq
HvnTNF3CUNeMcKIi5IElsYQFIkSKI/QaBVsNykjFUzOPV5HtKiSXbrfg1gCiVwNu
S7aU+lu/lIIKUBWt/shpnxYG4hOgjS8yasSvc7iEtZK6zwRndGMgpJ3jj5A02x1H
4Wye7fNlwk8Ti0tPcPebWXPSprqyarGSKY1pWpB00m/UcgZDbPyPjHK1kp97vYkC
lm27Vb95lKYPMtp5H7ngxDvdn4o7NEDUll9KokCN6s9ev8zn85YeJsRA8Hoi9E1o
OeqJUk/yhZwqAx2u
=raxR
-----END PGP SIGNATURE-----

J
J
Julien Lepiller wrote on 21 Aug 2021 16:01
Re: [bug#49867] [PATCH v2 13/31] gnu: Add ocaml-mirage-crypto.
(name . pukkamustard)(address . pukkamustard@posteo.net)(address . 49867@debbugs.gnu.org)
20210821160154.407b4928@tachikoma.lepiller.eu
Trying to build ocaml-mirage-crypto, I get errors during the tests:

ocamlopt tests/test_symmetric_runner.exe (exit 2)

Error: Files
/gnu/store/id3dchcsw5gijsnn73kw5sn9ymjj90ai-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/bigstring/eqaf_bigstring.cmxa
and
/gnu/store/id3dchcsw5gijsnn73kw5sn9ymjj90ai-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/eqaf.cmxa
make inconsistent assumptions over implementation Eqaf

this seems to indicate Eqaf did not build properly? Does it build for
you?

also, minor but there's a typo in the synopsis "provding" ->
"providing".
P
P
pukkamustard wrote on 23 Aug 2021 16:27
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 49867@debbugs.gnu.org)
86a6l8qlrf.fsf@posteo.net
Julien Lepiller <julien@lepiller.eu> writes:

Toggle quote (15 lines)
> Trying to build ocaml-mirage-crypto, I get errors during the
> tests:
>
> ocamlopt tests/test_symmetric_runner.exe (exit 2)
>
> Error: Files
> /gnu/store/id3dchcsw5gijsnn73kw5sn9ymjj90ai-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/bigstring/eqaf_bigstring.cmxa
> and
> /gnu/store/id3dchcsw5gijsnn73kw5sn9ymjj90ai-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/eqaf.cmxa
> make inconsistent assumptions over implementation Eqaf
>
> this seems to indicate Eqaf did not build properly? Does it
> build for
> you?

Negative. Can confirm that ocaml-mirage-crypto does not build when
rebased on master. I will investigate.

Toggle quote (3 lines)
> also, minor but there's a typo in the synopsis "provding" ->
> "providing".

Oops. Will fix.

-pukkamustard
P
P
pukkamustard wrote on 23 Aug 2021 18:52
(name . pukkamustard)(address . pukkamustard@posteo.net)
867dgcqf1h.fsf@posteo.net
pukkamustard <pukkamustard@posteo.net> writes:

Toggle quote (21 lines)
> Julien Lepiller <julien@lepiller.eu> writes:
>
>> Trying to build ocaml-mirage-crypto, I get errors during the
>> tests:
>>
>> ocamlopt tests/test_symmetric_runner.exe (exit 2)
>>
>> Error: Files
>> /gnu/store/id3dchcsw5gijsnn73kw5sn9ymjj90ai-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/bigstring/eqaf_bigstring.cmxa
>> and
>> /gnu/store/id3dchcsw5gijsnn73kw5sn9ymjj90ai-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/eqaf.cmxa
>> make inconsistent assumptions over implementation Eqaf
>>
>> this seems to indicate Eqaf did not build properly? Does it
>> build for
>> you?
>
> Negative. Can confirm that ocaml-mirage-crypto does not build
> when rebased on
> master. I will investigate.

This seems to be related to the recently added dune profile

The installed eqaf.cmxa seems to be the one built by using the
"dev" profile, whereas eqaf_bigstring.cmxa is expecting the Eqaf
module built with the "release" profile:

```
$ ocamlobjinfo
/gnu/store/id3dchcsw5gijsnn73kw5sn9ymjj90ai-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/bigstring/eqaf_bigstring.cmxa
[..]
Implementations imported:
193f160ab58c2c455f4e1fe1425b8971 Eqaf
[..]

$ ocamlobjinfo
/gnu/store/id3dchcsw5gijsnn73kw5sn9ymjj90ai-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/eqaf.cmxa
[..]
CRC of implementation: f693310ffd4f92f54cd1fde8271782b8
[..]
```

With (arguments `(#:profile "dev")):
```
$ ocamlobjinfo
/gnu/store/v2s1h1is0ci2ij2h8k5fbna3j8ycrw9y-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/bigstring/eqaf_bigstring.cmxa
[..]
Implementations imported:
[..]
-------------------------------- Eqaf

$ ocamlobjinfo
/gnu/store/v2s1h1is0ci2ij2h8k5fbna3j8ycrw9y-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/eqaf.cmxa
[..]
CRC of implementation: f693310ffd4f92f54cd1fde8271782b8
[..]
```

When using the "dev" profile the ocaml-eqaf and
ocaml-mirage-crypto build and pass the checks.

(I assume that the missing CRC in eqaf_bigstring.cmxa means it
does not check the CRC of the Eqaf implementation.)

If I set (arguments `(#:package "eqaf")), then also everything
builds fine and the hashes seem to be right:

```
$ ocamlobjinfo
/gnu/store/cyw1n07cqdh25w5awww185s44yzbcyss-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/bigstring/eqaf_bigstring.cmxa
Implementations imported:
193f160ab58c2c455f4e1fe1425b8971 Eqaf


$ ocamlobjinfo
/gnu/store/cyw1n07cqdh25w5awww185s44yzbcyss-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/eqaf.cmxa
CRC of implementation: 193f160ab58c2c455f4e1fe1425b8971
```

This seems weird. I don't understand why dune installs the
eqaf.cmxa built with "dev" profile but eqaf_bigstring.cmxa with
"release" profile. Maybe this is a bug in dune?

It does seem that using the dune "--profile" options on its own is
not very common. Opam uses the dune "-p" option. This sets the
profile to "release" and does a couple of other things
I don't think many people use the "--profile" option on its own.

For our dune-build-system I think it makes more sense to always
use the "-p" flag. This requires adding the explicit OCaml
package(s) to many specifications in Guix. I also think the
"profile" parameter should be removed as the interactions with the
"package" parameter (dune "-p") are not as expected. Sorry for not
doing this research before submitting the patch that added the
"profile" parameter.

Thoughts?

-pukkamustard
P
P
pukkamustard wrote on 8 Sep 2021 10:53
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 49867@debbugs.gnu.org)
86czpjxx4v.fsf@posteo.net
Julien Lepiller <julien@lepiller.eu> writes:

Toggle quote (13 lines)
> Trying to build ocaml-mirage-crypto, I get errors during the tests:
>
> ocamlopt tests/test_symmetric_runner.exe (exit 2)
>
> Error: Files
> /gnu/store/id3dchcsw5gijsnn73kw5sn9ymjj90ai-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/bigstring/eqaf_bigstring.cmxa
> and
> /gnu/store/id3dchcsw5gijsnn73kw5sn9ymjj90ai-ocaml-eqaf-0.7/lib/ocaml/site-lib/eqaf/eqaf.cmxa
> make inconsistent assumptions over implementation Eqaf
>
> this seems to indicate Eqaf did not build properly? Does it build for
> you?

This seems to be fixed with the patch for using dune release mode

Toggle quote (3 lines)
> also, minor but there's a typo in the synopsis "provding" ->
> "providing".

Attached fixed patch for ocaml-mirage. I can resubmit the entire series
if that is easier.
From e5430a30e9f228963537cb5fe0dc8184252c2f1e Mon Sep 17 00:00:00 2001
From: pukkamustard <pukkamustard@posteo.net>
Date: Tue, 3 Aug 2021 12:03:23 +0200
Subject: [PATCH 13/31] gnu: Add ocaml-mirage-crypto.

* gnu/packages/ocaml.scm (ocaml-mirage-crypto): New variable.
---
gnu/packages/ocaml.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 75f6a24a84..8d00d6cb01 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7635,6 +7635,37 @@ QuickCheck-style property-based testing and the magical bug-finding powers of
constant-time to avoid timing-attack with crypto stuff.")
(license license:expat)))
+(define-public ocaml-mirage-crypto
+ (package
+ (name "ocaml-mirage-crypto")
+ (version "0.10.3")
+ (home-page "https://github.com/mirage/mirage-crypto")
+ (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
+ "0j7x07c8xy8bmqp9ad1cib6j69dy7acjg9m1d7pn0dnmbkrl8fiz"))))
+ (build-system dune-build-system)
+ (arguments `(#:package "mirage-crypto"
+ #:test-target "."))
+ (propagated-inputs
+ `(("ocaml-cstruct" ,ocaml-cstruct)
+ ("ocaml-eqaf" ,ocaml-eqaf)
+ ("ocaml-bigarray-compat" ,ocaml-bigarray-compat)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("ocaml-ounit" ,ocaml-ounit)))
+ (synopsis "OCaml library providing cryptographic primitives")
+ (description "This OCaml library provides symmetric ciphers (DES, AES,
+RC4, ChaCha20/Poly1305), and hashes (MD5, SHA-1, SHA-2). This library can be
+used from MirageOS unikernels.")
+ (license license:isc)))
+
(define-public js-of-ocaml
(package
(name "js-of-ocaml")
--
2.33.0
P
P
pukkamustard wrote on 15 Nov 2021 14:23
Re: [PATCH 00/29] gnu: Add ocaml-cohttp-lwt-unix.
(address . 49867-done@debbugs.gnu.org)(name . pukkamustard)(address . pukkamustard@posteo.net)
86mtm5zgs5.fsf@posteo.net
Closing this issue for the moment as I'm no longer using
ocaml-cohttp-lwt-unix, it is a considerable series and effort is
probably better spent elsewhere.

Feel free to reopen or recycle if interested in the packages.

pukkamustard <pukkamustard@posteo.net> writes:

Toggle quote (48 lines)
> Hi,
>
> These patches add ocaml-cohttp-lwt-unix - an OCaml HTTP library - and dependencies.
>
> Some known rough edges:
>
> - ocaml-eqaf: Tests are disabled for now as I am not able to build ocaml-afl-persistent which is a dependency for ocaml-crowbar which is required to run ocaml-eqaf tests. There is ongoing work to port ocaml-afl-persistent to dune (https://github.com/stedolan/ocaml-afl-persistent/pull/7) with that it should be much easier to build it and enable tests for ocaml-eqaf.
> - ocaml-mirage-crypto-ec: Contains generated code from Fiat-Crypto (https://github.com/mit-plv/fiat-crypto). It would be nicer to generate the C code from the Coq sources during Guix build, but that seems like a lot more work.
> - ocaml-ca-certs: Tests requie access to `/etc/ssl/certs/*` which does not seem to be available during tests. Any ways to allow this in the test environment?
> - ocaml-cohttp-lwt-unix: Seems to require network during tests. Can someone confirm this?
>
> Thanks,
> pukkamustard
>
>
> pukkamustard (29):
> gnu: Add ocaml-cohttp-lwt.
> gnu: Add ocaml-domain-name.
> gnu: Add ocaml-macaddr.
> gnu: Add ocaml-ipaddr.
> gnu: Add ocaml-ipaddr-cstruct.
> gnu: Add ocaml-ipaddr-sexp.
> gnu: Add ocaml-conduit.
> gnu: Add ocaml-conduit-lwt.
> gnu: Add ocaml-eqaf.
> gnu: Add ocaml-mirage-crypto.
> gnu: Add ocaml-duration.
> gnu: Add ocaml-randomconv.
> gnu: Add ocaml-mirage-crypto-rng.
> gnu: Add ocaml-mirage-crypto-pk.
> gnu: Add ocaml-ptime.
> gnu: Add ocaml-asn1-combinators.
> gnu: Add ocaml-ppx-deriving.
> gnu: Add ocaml-ppx-deriving-yojson.
> gnu: Add ocaml-mirage-crypto-ec.
> gnu: Add ocaml-gmap.
> gnu: Add ocaml-pbkdf.
> gnu: Add ocaml-cstruct-unix.
> gnu: Add ocaml-x509.
> gnu: Add ocaml-ca-certs.
> gnu: Add ocaml-lwt-log.
> gnu: Add ocaml-lwt-ssl.
> gnu: Add ocaml-conduit-lwt-unix.
> gnu: Add ocaml-magic-mime.
> gnu: Add ocaml-cohttp-lwt-unix
>
> gnu/packages/ocaml.scm | 787 ++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 786 insertions(+), 1 deletion(-)
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49867@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49867
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch