diff mbox series

[bug#49101,v2,1/5] gnu: ocaml4.07-pcre: Switch to default OCaml compiler.

Message ID 297c3da0df390937b17eb9fceb33202a25bf1f34.1624093132.git.public@yoctocell.xyz
State Accepted
Headers show
Series Add ocaml-mparser & firends | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Xinglu Chen June 19, 2021, 9:03 a.m. UTC
* gnu/packages/ocaml.scm (ocaml4.07-pcre): Rename to ‘ocaml-pcre’.
[version]: Update to latest version.
[arguments]: Use default OCaml compiler.
[native-inputs]: Adjust accordingly.
[propagated-inputs]: Likewise.
---
 gnu/packages/ocaml.scm | 50 ++++++++++++++++++++++--------------------
 1 file changed, 26 insertions(+), 24 deletions(-)

Comments

Julien Lepiller June 19, 2021, 11:01 a.m. UTC | #1
Le Sat, 19 Jun 2021 11:03:39 +0200,
Xinglu Chen <public@yoctocell.xyz> a écrit :

> * gnu/packages/ocaml.scm (ocaml4.07-pcre): Rename to ‘ocaml-pcre’.
> [version]: Update to latest version.
> [arguments]: Use default OCaml compiler.
> [native-inputs]: Adjust accordingly.
> [propagated-inputs]: Likewise.

Great!

> ---
>  gnu/packages/ocaml.scm | 50
> ++++++++++++++++++++++-------------------- 1 file changed, 26
> insertions(+), 24 deletions(-)
> 
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index a8432ebbfe..e02684fefd 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -3086,35 +3086,37 @@ every compliant installation of OCaml and
> organize these libraries into a hierarchy of modules.")
>      (license license:lgpl2.1+)))
>  
> -(define-public ocaml4.07-pcre
> +(define-public ocaml-pcre
>    (package
> -    (name "ocaml4.07-pcre")
> -    (version "7.4.1")
> -    (source (origin
> -              (method git-fetch)
> -              (uri (git-reference
> -                     (url "https://github.com/mmottl/pcre-ocaml")
> -                     (commit version)))
> -              (file-name (git-file-name name version))
> -              (sha256
> -               (base32
> -
> "11sd8g668h48790lamz0riw9jgnfkaif5qdfa0akcndwa6aj07jf"))))
> +    (name "ocaml-pcre")
> +    (version "7.4.6")

If possible, it would be best not to update pcre at the same time. You
can try updating first, then switch to the latest ocaml, or the other
way around. If it's really not possible, please add the version number
to the commit message.

> +    (source
> +      (origin
> +        (method git-fetch)
> +        (uri (git-reference
> +              (url "https://github.com/mmottl/pcre-ocaml")
> +              (commit version)))
> +        (file-name (git-file-name name version))
> +        (sha256
> +          (base32
> +
> "11mck879p5zvkghps4ky8yslm0isgz52d84adl0dmcfxv2ibvcym"))))
> (build-system dune-build-system) (arguments
> -     `(#:test-target "."
> -       #:ocaml ,ocaml-4.07
> -       #:findlib ,ocaml4.07-findlib
> -       #:dune ,ocaml4.07-dune))
> +     ;; No tests.
> +     '(#:tests? #f))

Are you sure there are no tests? There used to be tests that could be
found at the top-level directory (#:test-target "."). Doesn't that work
anymore?

> +    (propagated-inputs
> +     `(("dune-configurator" ,dune-configurator)
> +       ("pcre" ,pcre)))
>      (native-inputs
> -     `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
> -       ("pcre:bin" ,pcre "bin")))
> -    (propagated-inputs `(("pcre" ,pcre)))
> +     `(("pcre:bin" ,pcre "bin")))
>      (home-page "https://mmottl.github.io/pcre-ocaml")
> -    (synopsis "Bindings to the Perl Compatibility Regular
> Expressions library")
> -    (description "Pcre-ocaml offers library functions for string
> pattern -matching and substitution, similar to the functionality
> offered by the Perl -language.")
> -    (license license:lgpl2.1+))); with the OCaml link exception
> +    (synopsis
> +      "Bindings to the Perl Compatibility Regular Expressions
> library")
> +    (description "pcre-ocaml offers library functions for string
> +pattern matching and substitution, similar to the functionality
> +offered by the Perl language.")
> +    ;; With static linking exception
> +    (license license:lgpl2.1+)))

Otherwise, looks good.

>  
>  (define-public ocaml4.07-expect
>    (package
Xinglu Chen June 19, 2021, 1:51 p.m. UTC | #2
On Sat, Jun 19 2021, Julien Lepiller wrote:

>> -(define-public ocaml4.07-pcre
>> +(define-public ocaml-pcre
>>    (package
>> -    (name "ocaml4.07-pcre")
>> -    (version "7.4.1")
>> -    (source (origin
>> -              (method git-fetch)
>> -              (uri (git-reference
>> -                     (url "https://github.com/mmottl/pcre-ocaml")
>> -                     (commit version)))
>> -              (file-name (git-file-name name version))
>> -              (sha256
>> -               (base32
>> -
>> "11sd8g668h48790lamz0riw9jgnfkaif5qdfa0akcndwa6aj07jf"))))
>> +    (name "ocaml-pcre")
>> +    (version "7.4.6")
>
> If possible, it would be best not to update pcre at the same time. You
> can try updating first, then switch to the latest ocaml, or the other
> way around. If it's really not possible, please add the version number
> to the commit message.

OK, will keep this in mind.

>> +    (source
>> +      (origin
>> +        (method git-fetch)
>> +        (uri (git-reference
>> +              (url "https://github.com/mmottl/pcre-ocaml")
>> +              (commit version)))
>> +        (file-name (git-file-name name version))
>> +        (sha256
>> +          (base32
>> +
>> "11mck879p5zvkghps4ky8yslm0isgz52d84adl0dmcfxv2ibvcym"))))
>> (build-system dune-build-system) (arguments
>> -     `(#:test-target "."
>> -       #:ocaml ,ocaml-4.07
>> -       #:findlib ,ocaml4.07-findlib
>> -       #:dune ,ocaml4.07-dune))
>> +     ;; No tests.
>> +     '(#:tests? #f))
>
> Are you sure there are no tests? There used to be tests that could be
> found at the top-level directory (#:test-target "."). Doesn't that work
> anymore?

Looking at the Git repo[1], I don’t see any files that would indicate
that there are tests.  Maybe I missed something, but I will see if
(#:test-target ".") does anything useful.

[1]: https://github.com/mmottl/pcre-ocaml
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a8432ebbfe..e02684fefd 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3086,35 +3086,37 @@  every compliant installation of OCaml and organize these libraries into a
 hierarchy of modules.")
     (license license:lgpl2.1+)))
 
-(define-public ocaml4.07-pcre
+(define-public ocaml-pcre
   (package
-    (name "ocaml4.07-pcre")
-    (version "7.4.1")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                     (url "https://github.com/mmottl/pcre-ocaml")
-                     (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "11sd8g668h48790lamz0riw9jgnfkaif5qdfa0akcndwa6aj07jf"))))
+    (name "ocaml-pcre")
+    (version "7.4.6")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/mmottl/pcre-ocaml")
+              (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32
+            "11mck879p5zvkghps4ky8yslm0isgz52d84adl0dmcfxv2ibvcym"))))
     (build-system dune-build-system)
     (arguments
-     `(#:test-target "."
-       #:ocaml ,ocaml-4.07
-       #:findlib ,ocaml4.07-findlib
-       #:dune ,ocaml4.07-dune))
+     ;; No tests.
+     '(#:tests? #f))
+    (propagated-inputs
+     `(("dune-configurator" ,dune-configurator)
+       ("pcre" ,pcre)))
     (native-inputs
-     `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
-       ("pcre:bin" ,pcre "bin")))
-    (propagated-inputs `(("pcre" ,pcre)))
+     `(("pcre:bin" ,pcre "bin")))
     (home-page "https://mmottl.github.io/pcre-ocaml")
-    (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
-    (description "Pcre-ocaml offers library functions for string pattern
-matching and substitution, similar to the functionality offered by the Perl
-language.")
-    (license license:lgpl2.1+))); with the OCaml link exception
+    (synopsis
+      "Bindings to the Perl Compatibility Regular Expressions library")
+    (description "pcre-ocaml offers library functions for string
+pattern matching and substitution, similar to the functionality
+offered by the Perl language.")
+    ;; With static linking exception
+    (license license:lgpl2.1+)))
 
 (define-public ocaml4.07-expect
   (package