diff mbox series

[bug#47027,1/2] gnu: Add guile-quickcheck.

Message ID 20210309193925.15447-1-samplet@ngyro.com
State Accepted
Headers show
Series [bug#47027,1/2] gnu: Add guile-quickcheck. | expand

Checks

Context Check Description
cbaines/submitting builds success
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

Timothy Sample March 9, 2021, 7:39 p.m. UTC
* gnu/packages/guile-xyz.scm (guile-quickcheck): New variable.
---
 gnu/packages/guile-xyz.scm | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

Comments

Leo Prikler March 10, 2021, 10 a.m. UTC | #1
This package seems fine to add on its own.
W.r.t. the description I'd avoid overusing the word "library".  In
particular, I'd like to compare it to ghc-quickcheck, which starts with
"QuickCheck is a library".
Perhaps something among the lines of 
  "Guile-Quickcheck is a library for random testing of program
properties inspired similar to ghc-quickcheck.  You can use it to
express properties, which functions should satisfy, as Scheme code and
then check whether they hold in a large number of randomly generated
cases."
would make more sense?

Regards,
Leo
M March 14, 2021, 9:12 p.m. UTC | #2
On Tue, 2021-03-09 at 14:39 -0500, Timothy Sample wrote:
> [...]
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(("guile" ,guile-3.0)))

Shouldn't the "guile" input be included in the native-inputs
as well (perhaps only native-inputs suffices), for cross-compilation?
Guile's compiled .go are architecture-dependent.  (Make sure the
--target= option is passed to "guild compile" in the Makefile.am
if it isn't already.)

Maxime.
Ludovic Courtès March 17, 2021, 8:52 p.m. UTC | #3
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> On Tue, 2021-03-09 at 14:39 -0500, Timothy Sample wrote:
>> [...]
>> +    (native-inputs
>> +     `(("pkg-config" ,pkg-config)))
>> +    (inputs
>> +     `(("guile" ,guile-3.0)))
>
> Shouldn't the "guile" input be included in the native-inputs
> as well (perhaps only native-inputs suffices), for cross-compilation?

Yes it should, good point.

Thank you.

Ludo’, impatient to see Disarchive pushed.  :-)
diff mbox series

Patch

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index bd26010918..5f4329be11 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -22,7 +22,7 @@ 
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2019 swedebugia <swedebugia@riseup.net>
 ;;; Copyright © 2019, 2020 Amar Singh <nly@disroot.org>
-;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
+;;; Copyright © 2019, 2021 Timothy Sample <samplet@ngyro.com>
 ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
 ;;; Copyright © 2020 Evan Straw <evan.straw99@gmail.com>
 ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
@@ -4616,3 +4616,29 @@  binary which is smaller and faster to generate and parse.  This package provides
 a Guile implementation of CBOR.")
     (home-page "https://inqlab.net/git/guile-cbor.git")
     (license license:gpl3+)))
+
+(define-public guile-quickcheck
+  (package
+    (name "guile-quickcheck")
+    (version "0.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://files.ngyro.com/"
+                                  "guile-quickcheck/guile-quickcheck-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "03mwi1l3354x52nar0zwhcm0x29yai9xjln4p4gbchwvx5dsr6fb"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("guile" ,guile-3.0)))
+    (home-page "https://ngyro.com/software/guile-quickcheck.html")
+    (synopsis "Randomized property-based testing for Guile")
+    (description "This Guile library provides tools for randomized,
+property-based testing.  It follows closely the QuickCheck library
+written in Haskell.  You can use it to define a property (a predicate
+with specifications for its inputs) and test it by generating many
+random inputs and seeing if it holds.")
+    (license license:gpl3+)))