guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#49101] [PATCH 0/4] Add ocaml-mparser & friends


From: Julien Lepiller
Subject: [bug#49101] [PATCH 0/4] Add ocaml-mparser & friends
Date: Sat, 19 Jun 2021 00:28:51 +0200

Le Fri, 18 Jun 2021 21:00:51 +0200,
Xinglu Chen <public@yoctocell.xyz> a écrit :

> This series adds ‘ocaml-mparser’, a monad parser combinator library,
> plus two extensions for it --- ‘ocaml-mparser-re’ and
> ‘ocaml-mparser-pcre’.
> 
> I noticed that there already exists an ‘ocaml4.07-pcre’ package, what
> is the policy regarding ‘ocaml4.07-*’ and ‘ocaml-*’ packages?
> 
> Xinglu Chen (4):
>   gnu: Add ocaml-mparser.
>   gnu: Add ocaml-mparser-re.
>   gnu: Add ocaml-mparser-pcre.
>   gnu: Add ocaml-pcre.
> 
>  gnu/packages/ocaml.scm | 88
> ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88
> insertions(+)
> 
> 
> base-commit: caf4a7a2770ef4d05a6e18f40d602e51da749ddc

Hi Xinglu,

thank you for the patches! First, you should reorder your patches: we
try to make sure every revision of guix is correct, but after the third
patch, ocaml-pcre is missing. I would simply put pcre first :).

To answer your question, we try to avoid having both the ocaml and
ocaml4.07 around if possible. It seems that ocaml4.07-pcre is only
required for ocaml4.07-expect. Could you check if it is possible to
build expect with our latest ocaml package?

If so, please have a patch that builds pcre and expect with the latest
ocaml, then another patch for updating pcre to the latest version, then
your three patches to add mparser.

If not, then we have to keep ocaml4.07-pcre around, so here is how we
do it, in a single patch:

Replace ocaml4.07-pcre with ocaml-pcre (remove the arguments that use
ocaml-4.07) and create a new ocaml4.07-pcre that inherits from it. It
would look like this:

(define-public ocaml-pcre
  (package
    (name "ocaml-pcre")
    ...
    (properties `((ocaml4.07-variant ,(delay ocaml4.07-pcre))))
    ...))

(define-public ocaml4.07-pcre
  (package-with-ocaml4.07
    (package
      (inherit ocaml-pcre)
      ...
      (properties '()))))

If the latest version of pcre cannot be built with ocaml 4.07, you can
specify a different source, like we do for ocaml4.07-parsexp for
instance.

I'm looking forward to v2 of this series :)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]