Message ID | 20220929164718.16973-1-raingloom@riseup.net |
---|---|
State | New |
Headers | show |
Series | [bug#58174,1/3] gnu: Add ocaml-domain-name. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | |
cbaines/issue | success | View issue |
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | |
cbaines/issue | success | View issue |
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
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
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
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.
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.
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.
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
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.
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
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)))