[PATCH 1/3] gnu: Add ocaml-domain-name.

  • Open
  • quality assurance status badge
Details
4 participants
  • Julien Lepiller
  • Christopher Baines
  • raingloom
  • zimoun
Owner
unassigned
Submitted by
raingloom
Severity
normal
Merged with
R
R
raingloom wrote on 29 Sep 2022 18:47
(address . guix-patches@gnu.org)(name . raingloom)(address . raingloom@riseup.net)
20220929164718.16973-1-raingloom@riseup.net
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

Toggle diff (76 lines)
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
C
C
Christopher Baines wrote on 21 Nov 2022 14:50
(no subject)
(name . GNU Debbugs)(address . control@debbugs.gnu.org)
87a64kv2kn.fsf@cbaines.net
merge 58172 58173 58174
thanks
C
C
Christopher Baines wrote on 21 Nov 2022 14:51
Re: [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
(name . raingloom)(address . raingloom@riseup.net)
875yf8v2gv.fsf@cbaines.net
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
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmN7gsBfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xe6ZA//bNCRHDoVJ78CgUX0lc1ey+ItfLQ39NR1
TRIp1uQPQniUlNlZ+35u64hvPxy9hM97VhqlEcM2sgqGgdUqy9YGJuC9Z5zWjLD+
eIWzGvWTvSlkkQK/xkL8qFEe4lZBQ1gk8v2LMj500z+GZw+MoqCKlb16Ao8/mfnd
A/NmsFyghkzuF35991ra5sLncPs/JMoCK4PdJyt5+KZ/gvouf9ZirVgpR5bXy722
8Jdid820UObsD31mSiESt8k8uUs4fMh9rNEkUKP5ckq4Zxq/X3/GDOuxu15esVpj
gcY9D9iz4hBrTcvgttZ9aebPZo5SjNP85lsn1K24nIdsNjqYpH0IcxNef58Q7vFq
ykXp/T1+Fzp5VE1e6tH5GrqpDeEvv1Ku6DOJCpkm5us2EOZEDn13UeMNGdrgWay/
H3c8xD6WZaFC+NmZ/yHkvYhbMUOjvCc/gkdlEBMLG/9Q8sfne34jfllfEiKtlJ9N
9WpI6/Uvxm33jTzVZxnvAYK54wVdLnA7I/1V7OTD4p8RcEAktvHT8L+1q8DxuvYQ
svSHiAwLK8gE/YyazS2QjA1aVEgGaFCX5QTvD0xuOJl1fCXQazWRS+y6PpQOazn/
ta9nkz8oWUvSJCwX5BLOA6k+2NSPXERCvmUGpxG5WWfFpnBkCcDHyEnKwgODLjE1
XfQMCbljCBY=
=XCER
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 21 Nov 2022 15:52
tag 58173 moreinfo
(address . control@debbugs.gnu.org)
877czo742f.fsf@cbaines.net
tags 58173 + moreinfo
quit
C
Re: [bug#58174] [PATCH 1/3] gnu: Add ocaml-domain-name.
(name . Christopher Baines)(address . mail@cbaines.net)
875yf8mdol.fsf@riseup.net
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (15 lines)
> [[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.
Z
Z
zimoun wrote on 21 Nov 2022 18:08
(address . 58174@debbugs.gnu.org)
87r0xwutej.fsf@gmail.com
Hi Chris,

On Mon, 21 Nov 2022 at 13:51, Christopher Baines <mail@cbaines.net> wrote:
Toggle quote (4 lines)
> 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.»


Somehow, it is more that just networking, for instance. :-)


Toggle quote (3 lines)
> 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,


Cheers,
simon
C
C
Christopher Baines wrote on 22 Nov 2022 09:29
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 58174@debbugs.gnu.org)
8735abtmqq.fsf@cbaines.net
zimoun <zimon.toutoune@gmail.com> writes:

Toggle quote (15 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmN8iJ1fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xe7Ow/+IKGpOU6bFa0h9OiHNd7w5iGuBH1g5LhC
jTrtq1YkzJVRqWboDf/wT9Fm5gG1j97aa7JAkkJkwViwCuVEsVlL/oDazR83admi
31TkFKxiNKEZyUienm1S+EJY330VIRkmq+xiEPB1/0fJ0rlZHKs1UY0vKlPuVjG8
VqNNWmvwBRv+hXKMJc622XZxkjWraqruyQAGqqZanDXMumMfZkPhnqvCKNQazj8b
OajZCKVZ2ueLIgSBgabT0wZxrzpsrWAhUJZ/F8V2s55dWeXqoTsZ7BJL8pWDSGAp
TCQflRUSA/HuyO7xnt/KIujzoDSh5/fmXT0wnRJ4VnLzN9piDLo/9En9auVMK+rU
aBauVybxP/2QuQXEnun4tTQbVg5RDuIrWyB6AwrZz58d6glzh3ZgY66HNOXRz/WM
31zrS0E+gXAK7MfKlbDdvcLczAd/o87TgJaIj54AUrJnuUnDG08R+5ilLb6HR9WL
Zq2VrFU3zDU3aZqR/hqu3sNVbS49HijH9vcTPBBuJXPLwCp35DT4kgiuxUrgG2A/
of2RXNUW7usgf/xTc5i+xFURTDlnP+11xax9pZnNFPbMxhoxcW2XVPXsM2IqRQK9
ceaBVHG7DGuabBKeHU4WJk3h6okBORfkBCEpFRBoy8YiNUa8XGQf6hVe5M8SJKoN
CnlOJM6d+kc=
=BSu3
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 22 Nov 2022 11:01
(name . Csepp)(address . raingloom@riseup.net)
878rk3s3vi.fsf@cbaines.net
Csepp <raingloom@riseup.net> writes:

Toggle quote (25 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmN8nmFfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xefdg/9EZYL4f/kHUWxsxCVQsOJ3Yw8tOsBqH0y
N1/xXFdwtcfRDYkNnBJpZlKuam2izuonJG1iCgml+5/ZeHTESOB6H9OCXbgtz7IU
35j9QuKvirVcvDDY/gawH/zBFth+vJdCvWMu7GaDrxDAqLlRTkYJw2c6ddyw+hR3
07OcIKM6SCydAlMC++gupx/YTOfsZqHj+XrqhQTwM5CiQXVUsnXgiRSgltd/7a/C
aH1QkLjKr2QayGHePIRxwViAftVyznq0nvGAs14SMHh4TFKQj+hJ627jWH2Dgcz3
qFppYFLqasCCwao9MLkqNKzP9zl39OvdOo2roew5PzFZ9j3J4/PB00eFs/EWPhCA
JVb0KJ2Y7cbZw5x2AP3ZvDY/qjVbkE0hLUlZ+hApTRX2syw1VWyeO3VaPWvgGZF1
xYUTMeRao/rvw2xDPTrtQAU+hVMANP9YgCVYBTBoR+yNpmUiCTfIVFFGVmuUIsPk
C20Sa53nCcQjYsFVEB6G30BcZ7+vTIiWrNGEClaOHjr9/jaKN0R73P+TPWzeggtP
17ijEtAFs1pHv0ZVvFbGVtuRaYYJ8OMMAcT1Urvd2COcBckUdXMOBnPEbdRjhkZO
1ekGntPn/cGHGZ5vy1iLOfytVxp+Pa7GL6ob85X9G8aEG0rfwWdcvl2w+LdcRcqF
O7VFAtS6c5k=
=cI2C
-----END PGP SIGNATURE-----

C
(name . Christopher Baines)(address . mail@cbaines.net)
871qpvmakq.fsf@riseup.net
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (36 lines)
> [[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.
Z
Z
zimoun wrote on 22 Nov 2022 13:22
86k03ndvr8.fsf@gmail.com
Hi,

On Tue, 22 Nov 2022 at 10:01, Christopher Baines <mail@cbaines.net> wrote:

Toggle quote (5 lines)
> 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:

Toggle snippet (13 lines)
./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")


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
J
J
Julien Lepiller wrote on 22 Nov 2022 15:42
6FF3ECFC-B6FD-472E-AD8D-5BCCB82DB3C2@lepiller.eu
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 :
Toggle quote (41 lines)
>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: file
?
Your comment

Commenting via the web interface is currently disabled.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 58174
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