* [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
@ 2022-09-29 16:47 raingloom
2022-09-29 16:47 ` [bug#58173] [PATCH 2/3] gnu: Add ocaml-macaddr raingloom
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: raingloom @ 2022-09-29 16:47 UTC (permalink / raw)
To: 58174; +Cc: raingloom
gnu/packages/ocaml-mirage.scm: New file.
gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
gnu/local.mk | 1 +
gnu/packages/ocaml-mirage.scm | 56 +++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+)
create mode 100644 gnu/packages/ocaml-mirage.scm
diff --git a/gnu/local.mk b/gnu/local.mk
index 0134fb53d8..2d2e8a3a6f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -449,6 +449,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/nutrition.scm \
%D%/packages/nvi.scm \
%D%/packages/ocaml.scm \
+ %D%/packages/ocaml-mirage.scm \
%D%/packages/ocr.scm \
%D%/packages/openkinect.scm \
%D%/packages/onc-rpc.scm \
diff --git a/gnu/packages/ocaml-mirage.scm b/gnu/packages/ocaml-mirage.scm
new file mode 100644
index 0000000000..67514c4932
--- /dev/null
+++ b/gnu/packages/ocaml-mirage.scm
@@ -0,0 +1,56 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Csepp <raingloom@riseup.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages ocaml-mirage)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix build-system dune)
+ #:use-module (gnu packages ocaml)
+ #:use-module ((guix licenses)
+ #:prefix license:))
+
+(define-public ocaml-domain-name
+ (package
+ (name "ocaml-domain-name")
+ (version "0.4.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hannesm/domain-name/")
+ (commit (string-append "v" version))))
+ (file-name name)
+ (sha256
+ (base32
+ "1a669zz1pc7sqbi1c13jsnp8algcph2b8gr5fjrjhyh3p232770k"))))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; TODO -j ncpu equivalent
+ (invoke "dune" "runtest" "-p" "domain-name")))))))
+ (build-system dune-build-system)
+ (native-inputs (list ocaml-alcotest))
+ (home-page "https://github.com/hannesm/domain-name")
+ (synopsis "RFC 1035 Internet domain name data structure and parser")
+ (description
+ "Parses and constructs RFC compliant domain names. The invariants on the
+length of domain names are preserved throughout the module.")
+ (license license:isc)))
--
2.37.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#58173] [PATCH 2/3] gnu: Add ocaml-macaddr.
2022-09-29 16:47 [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name raingloom
@ 2022-09-29 16:47 ` raingloom
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
2 siblings, 0 replies; 11+ messages in thread
From: raingloom @ 2022-09-29 16:47 UTC (permalink / raw)
To: 58173; +Cc: raingloom
* 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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#58172] [PATCH 3/3] gnu: Add ocaml-ipaddr.
2022-09-29 16:47 [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name raingloom
2022-09-29 16:47 ` [bug#58173] [PATCH 2/3] gnu: Add ocaml-macaddr raingloom
@ 2022-09-29 16:47 ` raingloom
2022-11-21 13:51 ` [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name Christopher Baines
2 siblings, 0 replies; 11+ messages in thread
From: raingloom @ 2022-09-29 16:47 UTC (permalink / raw)
To: 58172; +Cc: raingloom
* gnu/packages/ocaml-mirage.scm (ocaml-ipaddr): New variable.
---
This is the first of a number of packages needed to get MirageOS building under Guix.
gnu/packages/ocaml-mirage.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gnu/packages/ocaml-mirage.scm b/gnu/packages/ocaml-mirage.scm
index b1389507d5..488d46fcf5 100644
--- a/gnu/packages/ocaml-mirage.scm
+++ b/gnu/packages/ocaml-mirage.scm
@@ -92,3 +92,16 @@ (define-public ocaml-macaddr
`Macaddr_sexp` library
@end itemize")
(license license:isc)))
+
+(define-public ocaml-ipaddr
+ ;; same repo and versions as ocaml-macaddr
+ (package
+ (inherit ocaml-macaddr)
+ (name "ocaml-ipaddr")
+ (arguments (ipaddr-arguments "macaddr"))
+ (propagated-inputs (list ocaml-macaddr ocaml-domain-name))
+ (synopsis
+ "Library for manipulation of IP (and MAC) address representations")
+ (description
+ "IP address types with serialization, supporting a wide range of RFCs.")
+ (license license:isc)))
--
2.37.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
2022-09-29 16:47 [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name raingloom
2022-09-29 16:47 ` [bug#58173] [PATCH 2/3] gnu: Add ocaml-macaddr raingloom
2022-09-29 16:47 ` [bug#58172] [PATCH 3/3] gnu: Add ocaml-ipaddr raingloom
@ 2022-11-21 13:51 ` Christopher Baines
2022-11-21 17:08 ` zimoun
2022-11-21 17:11 ` Csepp
2 siblings, 2 replies; 11+ messages in thread
From: Christopher Baines @ 2022-11-21 13:51 UTC (permalink / raw)
To: raingloom; +Cc: 58174
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
Thanks for the patches. I don't think there's a need for another module
though, and if there is, it should probably have a more general topic
than mirage (e.g. networking).
So yeah, would you be able to move these packages to the ocaml module
and send an updated patch series?
Thanks,
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
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
1 sibling, 1 reply; 11+ messages in thread
From: zimoun @ 2022-11-21 17:08 UTC (permalink / raw)
To: Christopher Baines, raingloom; +Cc: 58174
Hi Chris,
On Mon, 21 Nov 2022 at 13:51, Christopher Baines <mail@cbaines.net> wrote:
> Thanks for the patches. I don't think there's a need for another module
> though, and if there is, it should probably have a more general topic
> than mirage (e.g. networking).
Mirage, which is named MirageOS, «is a library operating system that
constructs unikernels for secure, high-performance network applications
across a variety of cloud computing and mobile platforms.»
https://mirage.io/
Somehow, it is more that just networking, for instance. :-)
> So yeah, would you be able to move these packages to the ocaml module
> and send an updated patch series?
Well, I do not have an opinion but the MirageOS ecosystem can be large,
https://github.com/mirage
Cheers,
simon
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
2022-11-21 17:08 ` zimoun
@ 2022-11-22 8:29 ` Christopher Baines
0 siblings, 0 replies; 11+ messages in thread
From: Christopher Baines @ 2022-11-22 8:29 UTC (permalink / raw)
To: zimoun; +Cc: 58174
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
zimoun <zimon.toutoune@gmail.com> writes:
> Hi Chris,
>
> On Mon, 21 Nov 2022 at 13:51, Christopher Baines <mail@cbaines.net> wrote:
>> Thanks for the patches. I don't think there's a need for another module
>> though, and if there is, it should probably have a more general topic
>> than mirage (e.g. networking).
>
> Mirage, which is named MirageOS, «is a library operating system that
> constructs unikernels for secure, high-performance network applications
> across a variety of cloud computing and mobile platforms.»
>
> https://mirage.io/
>
> Somehow, it is more that just networking, for instance. :-)
My point was not that MirageOS is about networking, but these 3 packages
are related to networking, and not specific to MirageOS.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
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-21 17:11 ` Csepp
2022-11-22 10:01 ` Christopher Baines
1 sibling, 1 reply; 11+ messages in thread
From: Csepp @ 2022-11-21 17:11 UTC (permalink / raw)
To: Christopher Baines; +Cc: 58174, raingloom
Christopher Baines <mail@cbaines.net> writes:
> [[PGP Signed Part:Undecided]]
>
> Thanks for the patches. I don't think there's a need for another module
> though, and if there is, it should probably have a more general topic
> than mirage (e.g. networking).
>
> So yeah, would you be able to move these packages to the ocaml module
> and send an updated patch series?
>
> Thanks,
>
> Chris
>
> [[End of PGP Signed Part]]
I have a lot more packages in it (40-ish), a lot of them mirage
specific. Working in a separate file made rebasing and sorting commits
much easier.
But if it's a problem, I can move them to the main ocaml file, but I'd
like to avoid it becoming a monolith like gtk.scm, if for no other
reason than because I don't want to waste my time waiting for GUILEC to
recompile a bunch of expression I did not touch.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
2022-11-21 17:11 ` Csepp
@ 2022-11-22 10:01 ` Christopher Baines
2022-11-22 12:22 ` zimoun
2022-11-22 12:30 ` Csepp
0 siblings, 2 replies; 11+ messages in thread
From: Christopher Baines @ 2022-11-22 10:01 UTC (permalink / raw)
To: Csepp; +Cc: 58174
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]
Csepp <raingloom@riseup.net> writes:
> Christopher Baines <mail@cbaines.net> writes:
>
>> [[PGP Signed Part:Undecided]]
>>
>> Thanks for the patches. I don't think there's a need for another module
>> though, and if there is, it should probably have a more general topic
>> than mirage (e.g. networking).
>>
>> So yeah, would you be able to move these packages to the ocaml module
>> and send an updated patch series?
>>
>> Thanks,
>>
>> Chris
>>
>> [[End of PGP Signed Part]]
>
> I have a lot more packages in it (40-ish), a lot of them mirage
> specific. Working in a separate file made rebasing and sorting commits
> much easier.
> But if it's a problem, I can move them to the main ocaml file, but I'd
> like to avoid it becoming a monolith like gtk.scm, if for no other
> reason than because I don't want to waste my time waiting for GUILEC to
> recompile a bunch of expression I did not touch.
I'm fine with mirage specific stuff going in a mirage module, my issue
is that these first packages are not mirage specific, so I'd like to see
the separate module be more general (e.g. about networking), or for them
to just go in the ocaml module.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
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
1 sibling, 1 reply; 11+ messages in thread
From: zimoun @ 2022-11-22 12:22 UTC (permalink / raw)
To: Christopher Baines, Csepp; +Cc: pukkamustard, 58174, Julien Lepiller
Hi,
On Tue, 22 Nov 2022 at 10:01, Christopher Baines <mail@cbaines.net> wrote:
> I'm fine with mirage specific stuff going in a mirage module, my issue
> is that these first packages are not mirage specific, so I'd like to see
> the separate module be more general (e.g. about networking), or for them
> to just go in the ocaml module.
Indeed, these 3 packages should be in (gnu packages ocaml) to be
consistent with the current organization––MirageOS packages are already
in this module:
--8<---------------cut here---------------start------------->8---
./ocaml.scm:1169: (url "https://github.com/mirage/bigarray-compat")
./ocaml.scm:1587: (url "https://github.com/mirage/ocaml-base64")
./ocaml.scm:2448: (url "https://github.com/mirage/alcotest")
./ocaml.scm:2595: (url "https://github.com/mirage/mmap")
./ocaml.scm:3807: (url "https://github.com/mirage/ocaml-cstruct")
./ocaml.scm:3822: (url "https://github.com/mirage/ocaml-hex")
./ocaml.scm:3847: (url "https://github.com/mirage/ezjsonm")
./ocaml.scm:3902: (url "https://github.com/mirage/ocaml-uri")
./ocaml.scm:8149: (url "https://github.com/mirage/either")
./ocaml.scm:8428: (url "https://github.com/mirage/ocaml-cohttp")
--8<---------------cut here---------------end--------------->8---
About an OCaml module restructure: Well, in the module (gnu packages
ocaml), I count 291 packages, from compilers to standalone program
(unison) or libraries (ocaml-<something>).
IMHO, to be consistent with other build system, the structure should be:
- (gnu packages ocaml): contains OCaml compilers and toolchain
- (gnu packages ocaml-xyz): contains libraries and standalone program
- and maybe other (gnu packages ocaml-<subtopic>)?
OCaml team, WDYT?
Cheers,
simon
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
2022-11-22 12:22 ` zimoun
@ 2022-11-22 14:42 ` Julien Lepiller
0 siblings, 0 replies; 11+ messages in thread
From: Julien Lepiller @ 2022-11-22 14:42 UTC (permalink / raw)
To: zimoun, Christopher Baines, Csepp; +Cc: pukkamustard, 58174
[-- Attachment #1: Type: text/plain, Size: 2264 bytes --]
I don't have a strong opinion. Having mirage stuff in ocaml.scm is only because I didn't pay attention. We could move tgem to mirage.scm.
I agree moving stuff to ocaml-xyz and other subtopics could be good, but it's unrelated to this patcg series, so it shouldn't block it.
Le 22 novembre 2022 13:22:19 GMT+01:00, zimoun <zimon.toutoune@gmail.com> a écrit :
>Hi,
>
>On Tue, 22 Nov 2022 at 10:01, Christopher Baines <mail@cbaines.net> wrote:
>
>> I'm fine with mirage specific stuff going in a mirage module, my issue
>> is that these first packages are not mirage specific, so I'd like to see
>> the separate module be more general (e.g. about networking), or for them
>> to just go in the ocaml module.
>
>Indeed, these 3 packages should be in (gnu packages ocaml) to be
>consistent with the current organization––MirageOS packages are already
>in this module:
>
>--8<---------------cut here---------------start------------->8---
>./ocaml.scm:1169: (url "https://github.com/mirage/bigarray-compat")
>./ocaml.scm:1587: (url "https://github.com/mirage/ocaml-base64")
>./ocaml.scm:2448: (url "https://github.com/mirage/alcotest")
>./ocaml.scm:2595: (url "https://github.com/mirage/mmap")
>./ocaml.scm:3807: (url "https://github.com/mirage/ocaml-cstruct")
>./ocaml.scm:3822: (url "https://github.com/mirage/ocaml-hex")
>./ocaml.scm:3847: (url "https://github.com/mirage/ezjsonm")
>./ocaml.scm:3902: (url "https://github.com/mirage/ocaml-uri")
>./ocaml.scm:8149: (url "https://github.com/mirage/either")
>./ocaml.scm:8428: (url "https://github.com/mirage/ocaml-cohttp")
>--8<---------------cut here---------------end--------------->8---
>
>
>About an OCaml module restructure: Well, in the module (gnu packages
>ocaml), I count 291 packages, from compilers to standalone program
>(unison) or libraries (ocaml-<something>).
>
>IMHO, to be consistent with other build system, the structure should be:
>
> - (gnu packages ocaml): contains OCaml compilers and toolchain
> - (gnu packages ocaml-xyz): contains libraries and standalone program
> - and maybe other (gnu packages ocaml-<subtopic>)?
>
>OCaml team, WDYT?
>
>Cheers,
>simon
[-- Attachment #2: Type: text/html, Size: 2721 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
2022-11-22 10:01 ` Christopher Baines
2022-11-22 12:22 ` zimoun
@ 2022-11-22 12:30 ` Csepp
1 sibling, 0 replies; 11+ messages in thread
From: Csepp @ 2022-11-22 12:30 UTC (permalink / raw)
To: Christopher Baines; +Cc: 58174, raingloom
Christopher Baines <mail@cbaines.net> writes:
> [[PGP Signed Part:Undecided]]
>
> Csepp <raingloom@riseup.net> writes:
>
>> Christopher Baines <mail@cbaines.net> writes:
>>
>>> [[PGP Signed Part:Undecided]]
>>>
>>> Thanks for the patches. I don't think there's a need for another module
>>> though, and if there is, it should probably have a more general topic
>>> than mirage (e.g. networking).
>>>
>>> So yeah, would you be able to move these packages to the ocaml module
>>> and send an updated patch series?
>>>
>>> Thanks,
>>>
>>> Chris
>>>
>>> [[End of PGP Signed Part]]
>>
>> I have a lot more packages in it (40-ish), a lot of them mirage
>> specific. Working in a separate file made rebasing and sorting commits
>> much easier.
>> But if it's a problem, I can move them to the main ocaml file, but I'd
>> like to avoid it becoming a monolith like gtk.scm, if for no other
>> reason than because I don't want to waste my time waiting for GUILEC to
>> recompile a bunch of expression I did not touch.
>
> I'm fine with mirage specific stuff going in a mirage module, my issue
> is that these first packages are not mirage specific, so I'd like to see
> the separate module be more general (e.g. about networking), or for them
> to just go in the ocaml module.
>
> [[End of PGP Signed Part]]
I'd rather not bikeshed this further, so whatever, it can go to
ocaml.scm.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-11-22 14:43 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-29 16:47 [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name raingloom
2022-09-29 16:47 ` [bug#58173] [PATCH 2/3] gnu: Add ocaml-macaddr raingloom
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
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).