unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: raingloom <raingloom@riseup.net>
To: 58173@debbugs.gnu.org
Cc: raingloom <raingloom@riseup.net>
Subject: [bug#58173] [PATCH 2/3] gnu: Add ocaml-macaddr.
Date: Thu, 29 Sep 2022 18:47:17 +0200	[thread overview]
Message-ID: <20220929164718.16973-2-raingloom@riseup.net> (raw)
In-Reply-To: <20220929164718.16973-1-raingloom@riseup.net>

* gnu/packages/ocaml-mirage.scm
  (ipaddr-arguments) (ocaml-macaddr): New variables.
---
 gnu/packages/ocaml-mirage.scm | 38 +++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/ocaml-mirage.scm b/gnu/packages/ocaml-mirage.scm
index 67514c4932..b1389507d5 100644
--- a/gnu/packages/ocaml-mirage.scm
+++ b/gnu/packages/ocaml-mirage.scm
@@ -54,3 +54,41 @@ (define-public ocaml-domain-name
      "Parses and constructs RFC compliant domain names.  The invariants on the
 length of domain names are preserved throughout the module.")
     (license license:isc)))
+
+(define (ipaddr-arguments pkg)
+  `(#:package ,pkg
+    #:phases
+    (modify-phases %standard-phases
+      (replace 'check
+        (lambda* (#:key tests? #:allow-other-keys)
+          (when tests?
+            ;; no separate tests directory
+            (invoke "dune" "runtest" "-p" ,pkg)))))))
+
+(define-public ocaml-macaddr
+  (package
+    (name "ocaml-macaddr")
+    (version "5.3.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/mirage/ocaml-ipaddr/")
+                    (commit (string-append "v" version))))
+              (file-name name)
+              (sha256
+               (base32
+                "1zgwx0ms3l4k4dzwnkrwq4zzqjrddjsvqn66mbd0rm6aq1ib019d"))))
+    (build-system dune-build-system)
+    (arguments (ipaddr-arguments "macaddr"))
+    (propagated-inputs (list ocaml-cstruct))
+    (native-inputs (list ocaml-ounit2 ocaml-ppx-sexp-conv))
+    (home-page "https://github.com/mirage/ocaml-ipaddr")
+    (synopsis "OCaml library for manipulation of MAC address representations")
+    (description
+     "@itemize
+@item MAC-48 (Ethernet) address support
+@item `Macaddr` is a @code{Map.OrderedType}
+@item All types have sexplib serializers/deserializers optionally via the
+`Macaddr_sexp` library
+@end itemize")
+    (license license:isc)))
-- 
2.37.3





  reply	other threads:[~2022-09-29 18:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 16:47 [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name raingloom
2022-09-29 16:47 ` raingloom [this message]
2022-09-29 16:47 ` [bug#58172] [PATCH 3/3] gnu: Add ocaml-ipaddr raingloom
2022-11-21 13:51 ` [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name Christopher Baines
2022-11-21 17:08   ` zimoun
2022-11-22  8:29     ` Christopher Baines
2022-11-21 17:11   ` Csepp
2022-11-22 10:01     ` Christopher Baines
2022-11-22 12:22       ` zimoun
2022-11-22 14:42         ` Julien Lepiller
2022-11-22 12:30       ` Csepp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220929164718.16973-2-raingloom@riseup.net \
    --to=raingloom@riseup.net \
    --cc=58173@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).