diff mbox series

[bug#57298,3/5] gnu: Add ocaml-crowbar.

Message ID 20220819152432.26135-3-pukkamustard@posteo.net
State Accepted
Headers show
Series gnu: Add ocaml-digestif. (and dependencies) | 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

pukkamustard Aug. 19, 2022, 3:24 p.m. UTC
* gnu/packages/ocaml.scm (ocaml-crowbar): New variable.
---
 gnu/packages/ocaml.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

Comments

Julien Lepiller Aug. 20, 2022, 12:05 p.m. UTC | #1
Le Fri, 19 Aug 2022 15:24:30 +0000,
pukkamustard <pukkamustard@posteo.net> a écrit :

> +    (build-system dune-build-system)
> +    (arguments
> +     ;; Tests require ocaml-xmldiff which requires OCaml 4.12.0
> +     `(#:tests? #f))

That doesn't seem to be the case, at least from opam, the constraint is
ocaml >= 4.12. We have 4.14. Could you try adding xmldiff and enabling
tests?

> +    (propagated-inputs
> +     (list ocaml-ocplib-endian
> +           ocaml-cmdliner
> +           ocaml-afl-persistent))
> +    (native-inputs
> +     (list ocaml-calendar
> +           ocaml-fpath
> +           ocaml-uucp
> +           ocaml-uunf
> +           ocaml-uutf
> +           ocaml-pprint))
> +    (synopsis "Ocaml library for tests, let a fuzzer find failing
> cases")
> +    (description "Crowbar is a library for testing code, combining
> +QuickCheck-style property-based testing and the magical bug-finding
> powers of +@uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}.")
> +    (license license:expat)))
> +
>  (define-public ocaml-bibtex2html
>    (package
>      (name "ocaml-bibtex2html")
pukkamustard Aug. 22, 2022, 9:45 a.m. UTC | #2
Julien Lepiller <julien@lepiller.eu> writes:

> Le Fri, 19 Aug 2022 15:24:30 +0000,
> pukkamustard <pukkamustard@posteo.net> a écrit :
>
>> +    (build-system dune-build-system)
>> +    (arguments
>> +     ;; Tests require ocaml-xmldiff which requires OCaml 4.12.0
>> +     `(#:tests? #f))
>
> That doesn't seem to be the case, at least from opam, the constraint is
> ocaml >= 4.12. We have 4.14. Could you try adding xmldiff and enabling
> tests?

Again, this seems to have been an artifact of porting the package
definitions from an old patch series. Sorry for the sloppyness.

ocaml-crowbar no longer has tests that rely on xmldiff. I've enabled the
tests and it just works.

A general note on another OCaml dependency: ocaml-calendar seems to be
unmaintained
(https://discuss.ocaml.org/t/calendarlib-looking-for-a-new-maintainer/3965)
and some fixes are included in an unreleased Git branch
(https://github.com/ocaml-community/calendar/tree/3.x). No action
required from Guix side at the moment, just worth keeping in mind.

Thanks for your review! Will send in V2 shortly.

-pukkamustard

>
>> +    (propagated-inputs
>> +     (list ocaml-ocplib-endian
>> +           ocaml-cmdliner
>> +           ocaml-afl-persistent))
>> +    (native-inputs
>> +     (list ocaml-calendar
>> +           ocaml-fpath
>> +           ocaml-uucp
>> +           ocaml-uunf
>> +           ocaml-uutf
>> +           ocaml-pprint))
>> +    (synopsis "Ocaml library for tests, let a fuzzer find failing
>> cases")
>> +    (description "Crowbar is a library for testing code, combining
>> +QuickCheck-style property-based testing and the magical bug-finding
>> powers of +@uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}.")
>> +    (license license:expat)))
>> +
>>  (define-public ocaml-bibtex2html
>>    (package
>>      (name "ocaml-bibtex2html")
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index dc56fb3ba3..506153785a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -8604,6 +8604,42 @@  (define-public ocaml-pprint
 document and by the text width.")
     (license license:lgpl2.0)))
 
+(define-public ocaml-crowbar
+  (package
+    (name "ocaml-crowbar")
+    (version "0.2.1")
+    (home-page "https://github.com/stedolan/crowbar")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "11f3kiw58g8njx15akx16xcplzvzdw9y6c4jpyfxylkxws4g0f6j"))))
+    (build-system dune-build-system)
+    (arguments
+     ;; Tests require ocaml-xmldiff which requires OCaml 4.12.0
+     `(#:tests? #f))
+    (propagated-inputs
+     (list ocaml-ocplib-endian
+           ocaml-cmdliner
+           ocaml-afl-persistent))
+    (native-inputs
+     (list ocaml-calendar
+           ocaml-fpath
+           ocaml-uucp
+           ocaml-uunf
+           ocaml-uutf
+           ocaml-pprint))
+    (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
+    (description "Crowbar is a library for testing code, combining
+QuickCheck-style property-based testing and the magical bug-finding powers of
+@uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}.")
+    (license license:expat)))
+
 (define-public ocaml-bibtex2html
   (package
     (name "ocaml-bibtex2html")