Correct name and email address for ng0.
[jackhill/guix/guix.git] / gnu / packages / haskell-check.scm
CommitLineData
a06b9b50
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
3;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
4;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
7291ad1e 5;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
47956fa0 6;;; Copyright © 2016 ng0 <ng0@n0.is>
a06b9b50
RW
7;;; Copyright © 2016 David Craven <david@craven.ch>
8;;; Copyright © 2017 Danny Milosavljevic <dannym@scratchpost.org>
9;;; Copyright © 2017 rsiddharth <s@ricketyspace.net>
03de2634 10;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
44cea578 11;;; Copyright © 2018 Tonton <tonton@riseup.net>
cdccdec1 12;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
a06b9b50
RW
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29(define-module (gnu packages haskell-check)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages haskell)
47a6582b 32 #:use-module (gnu packages haskell-crypto)
a06b9b50
RW
33 #:use-module (guix build-system haskell)
34 #:use-module (guix download)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix packages)
37 #:use-module (guix utils))
38
39(define-public ghc-tasty-ant-xml
40 (package
41 (name "ghc-tasty-ant-xml")
8374cc4b 42 (version "1.1.4")
a06b9b50
RW
43 (source
44 (origin
45 (method url-fetch)
46 (uri (string-append
47 "https://hackage.haskell.org/package/tasty-ant-xml/tasty-ant-xml-"
48 version
49 ".tar.gz"))
50 (sha256
51 (base32
8374cc4b 52 "0v0gsb90kh6hwlgxbclzawsskywc6yf7n8xhiifia97l4y0yx2m8"))))
a06b9b50
RW
53 (build-system haskell-build-system)
54 (inputs
55 `(("ghc-generic-deriving" ,ghc-generic-deriving)
56 ("ghc-xml" ,ghc-xml)
a06b9b50
RW
57 ("ghc-stm" ,ghc-stm)
58 ("ghc-tagged" ,ghc-tagged)
59 ("ghc-tasty" ,ghc-tasty)))
60 (home-page
61 "https://github.com/ocharles/tasty-ant-xml")
62 (synopsis
63 "Render tasty output to XML for Jenkins")
64 (description
65 "A tasty ingredient to output test results in XML, using the Ant
66schema. This XML can be consumed by the Jenkins continuous integration
67framework.")
68 (license license:bsd-3)))
69
70(define-public ghc-tasty-smallcheck
71 (package
72 (name "ghc-tasty-smallcheck")
f3ec9866 73 (version "0.8.1")
a06b9b50
RW
74 (source
75 (origin
76 (method url-fetch)
77 (uri (string-append
78 "https://hackage.haskell.org/package/tasty-smallcheck/tasty-smallcheck-"
79 version
80 ".tar.gz"))
81 (sha256
82 (base32
f3ec9866 83 "1n66ngzllf3xrlqykwszlkwsi96n5nkm7xbpfq7774vpvfnafjri"))))
a06b9b50
RW
84 (build-system haskell-build-system)
85 (inputs
86 `(("ghc-tasty" ,ghc-tasty)
87 ("ghc-smallcheck" ,ghc-smallcheck)
88 ("ghc-async" ,ghc-async)
89 ("ghc-tagged" ,ghc-tagged)))
1fd90622 90 (home-page "https://documentup.com/feuerbach/tasty")
a06b9b50
RW
91 (synopsis "SmallCheck support for the Tasty test framework")
92 (description "This package provides SmallCheck support for the Tasty
93Haskell test framework.")
94 (license license:bsd-3)))
95
96(define-public ghc-tasty-quickcheck
97 (package
98 (name "ghc-tasty-quickcheck")
59a50276 99 (version "0.10")
a06b9b50
RW
100 (source
101 (origin
102 (method url-fetch)
103 (uri (string-append
104 "https://hackage.haskell.org/package/tasty-quickcheck/"
105 "tasty-quickcheck-" version ".tar.gz"))
106 (sha256
107 (base32
59a50276 108 "0vr6szbbz3s5461i0zr8zpq347zfvidfzv5gf3xwxhm0yk731z8h"))))
a06b9b50
RW
109 (build-system haskell-build-system)
110 (inputs
111 `(("ghc-quickcheck" ,ghc-quickcheck)
112 ("ghc-tagged" ,ghc-tagged)
113 ("ghc-tasty" ,ghc-tasty)
114 ("ghc-random" ,ghc-random)
115 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
116 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
117 ("ghc-pcre-light" ,ghc-pcre-light)))
118 (home-page "http://documentup.com/feuerbach/tasty")
119 (synopsis "QuickCheck support for the Tasty test framework")
120 (description "This package provides QuickCheck support for the Tasty
121Haskell test framework.")
122 (license license:expat)))
123
124(define-public ghc-tasty-golden
125 (package
126 (name "ghc-tasty-golden")
576b7dd5 127 (version "2.3.2")
a06b9b50
RW
128 (source
129 (origin
130 (method url-fetch)
131 (uri (string-append
132 "https://hackage.haskell.org/package/tasty-golden/tasty-golden-"
133 version
134 ".tar.gz"))
135 (sha256
136 (base32
576b7dd5 137 "0k3ibjhjc9vcwzrjnl4rnwvfm8l81q347nb7dgvcib6n5wm3s404"))))
a06b9b50
RW
138 (build-system haskell-build-system)
139 (inputs
140 `(("ghc-temporary" ,ghc-temporary)
141 ("ghc-tasty" ,ghc-tasty)
a06b9b50
RW
142 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
143 ("ghc-tagged" ,ghc-tagged)
144 ("ghc-async" ,ghc-async)
145 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
146 ("ghc-temporary-rc" ,ghc-temporary-rc)))
147 (home-page
148 "https://github.com/feuerbach/tasty-golden")
149 (synopsis "Golden tests support for tasty")
150 (description
49b9c800
TGR
151 "This package provides support for 'golden testing'. A @dfn{golden test}
152is an IO action that writes its result to a file. To pass the test, this
153output file should be identical to the corresponding 'golden' file, which
154contains the correct result for the test.")
a06b9b50
RW
155 (license license:expat)))
156
157;; This package builds `clock` without tests, since the tests rely on tasty
158;; and tasty-quickcheck, which in turn require clock to build.
159(define ghc-clock-bootstrap
160 (package
161 (name "ghc-clock-bootstrap")
162 (version "0.5.1")
163 (source
164 (origin
165 (method url-fetch)
166 (uri (string-append
167 "https://hackage.haskell.org/package/"
168 "clock/"
169 "clock-" version ".tar.gz"))
170 (sha256
171 (base32 "1ncph7vi2q6ywwc8ysxl1ibw6i5dwfvln88ssfazk8jgpj4iyykw"))))
172 (build-system haskell-build-system)
173 (arguments `(#:tests? #f)) ;; Testing suite depends on tasty and
174 ;; tasty-quickcheck, which need clock to build.
175 (home-page "https://hackage.haskell.org/package/clock")
176 (synopsis "High-resolution clock for Haskell")
177 (description "A package for convenient access to high-resolution clock and
178timer functions of different operating systems via a unified API.")
179 (license license:bsd-3)))
180
181(define-public ghc-tasty
182 (package
183 (name "ghc-tasty")
9d1944a4 184 (version "1.1.0.3")
a06b9b50
RW
185 (source
186 (origin
187 (method url-fetch)
188 (uri (string-append
189 "https://hackage.haskell.org/package/tasty/tasty-"
190 version
191 ".tar.gz"))
192 (sha256
193 (base32
9d1944a4 194 "14riid753hjqr6lca1kgxpnvq0wykf0k3qc5jpag42hh8bszav22"))))
a06b9b50
RW
195 (build-system haskell-build-system)
196 (inputs
197 `(("ghc-stm" ,ghc-stm)
a06b9b50 198 ("ghc-tagged" ,ghc-tagged)
669692eb 199 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
a06b9b50
RW
200 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
201 ("ghc-unbounded-delays" ,ghc-unbounded-delays)
202 ("ghc-async" ,ghc-async)
203 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
9d1944a4
TS
204 ("ghc-clock-bootstrap" ,ghc-clock-bootstrap)
205 ("ghc-wcwidth" ,ghc-wcwidth-bootstrap)))
a06b9b50
RW
206 (home-page "http://documentup.com/feuerbach/tasty")
207 (synopsis "Modern and extensible testing framework")
208 (description "Tasty is a modern testing framework for Haskell. It lets
209you combine your unit tests, golden tests, QuickCheck/SmallCheck properties,
210and any other types of tests into a single test suite.")
211 (license license:expat)))
212
213(define-public ghc-tasty-hunit
214 (package
215 (name "ghc-tasty-hunit")
58182daa 216 (version "0.10.0.1")
a06b9b50
RW
217 (source
218 (origin
219 (method url-fetch)
220 (uri (string-append
221 "https://hackage.haskell.org/package/tasty-hunit/tasty-hunit-"
222 version
223 ".tar.gz"))
224 (sha256
225 (base32
58182daa 226 "0j3hgga6c3s8h5snzivb8a75h96207ia2rlbxzj07xbf4zpkp44g"))))
a06b9b50
RW
227 (build-system haskell-build-system)
228 (inputs
58182daa
TS
229 `(("ghc-call-stack" ,ghc-call-stack-boot)
230 ("ghc-tasty" ,ghc-tasty)))
a06b9b50
RW
231 (home-page "http://documentup.com/feuerbach/tasty")
232 (synopsis "HUnit support for the Tasty test framework")
233 (description "This package provides HUnit support for the Tasty Haskell
234test framework.")
235 (license license:expat)))
236
237(define-public ghc-tasty-kat
238 (package
239 (name "ghc-tasty-kat")
240 (version "0.0.3")
241 (source (origin
242 (method url-fetch)
243 (uri (string-append "https://hackage.haskell.org/package/"
244 "tasty-kat/tasty-kat-" version ".tar.gz"))
245 (sha256
246 (base32
247 "14yvlpli6cv6bn3kh8mlfp4x1l6ns4fvmfv6hmj75cvxyzq029d7"))))
248 (build-system haskell-build-system)
249 (inputs
250 `(("ghc-tasty" ,ghc-tasty)
a06b9b50
RW
251 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
252 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
253 (home-page "https://github.com/vincenthz/tasty-kat")
254 (synopsis "Known Answer Tests (KAT) framework for tasty")
255 (description
256 "This package provides a @dfn{Known Answer Tests} (KAT) framework for
257tasty.")
258 (license license:expat)))
259
260(define-public ghc-tasty-th
261 (package
262 (name "ghc-tasty-th")
310d782e 263 (version "0.1.7")
a06b9b50
RW
264 (source
265 (origin
266 (method url-fetch)
267 (uri (string-append
268 "https://hackage.haskell.org/package/tasty-th/tasty-th-"
269 version ".tar.gz"))
270 (sha256
271 (base32
310d782e 272 "0b2ivrw2257m4cy4rjnkwqlarh83j1y3zywnmaqqqbvy667sqnj3"))))
a06b9b50
RW
273 (build-system haskell-build-system)
274 (inputs
310d782e
TS
275 `(("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
276 ("ghc-tasty" ,ghc-tasty)
277 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
a06b9b50
RW
278 (home-page "https://github.com/bennofs/tasty-th")
279 (synopsis "Automatically generate tasty TestTrees")
280 (description
281 "Tasty-th automatically generates tasty TestTrees from functions of the
282current module, using TemplateHaskell. This is a fork the original
283test-framework-th package, modified to work with tasty instead of
284test-framework.")
285 (license license:bsd-3)))
286
287(define-public ghc-tasty-rerun
288 (package
289 (name "ghc-tasty-rerun")
f752336c 290 (version "1.1.12")
a06b9b50
RW
291 (source (origin
292 (method url-fetch)
293 (uri (string-append
294 "https://hackage.haskell.org/package/tasty-rerun/"
295 "tasty-rerun-" version ".tar.gz"))
296 (sha256
297 (base32
f752336c 298 "05lp4zy6lwd916snq6hs43848n62j9vdfl3s8sfivqydrax0vvd8"))))
a06b9b50
RW
299 (build-system haskell-build-system)
300 (inputs
f54f0475 301 `(("ghc-optparse-applicative" ,ghc-optparse-applicative)
a06b9b50
RW
302 ("ghc-reducers" ,ghc-reducers)
303 ("ghc-split" ,ghc-split)
304 ("ghc-stm" ,ghc-stm)
305 ("ghc-tagged" ,ghc-tagged)
306 ("ghc-tasty" ,ghc-tasty)))
307 (home-page "https://github.com/ocharles/tasty-rerun")
308 (synopsis "Run tests by filtering the test tree")
309 (description "This package adds the ability to run tests by filtering the
310test tree based on the result of a previous test run. You can use this to run
311only those tests that failed in the last run, or to only run the tests that have
312been added since previous test run.")
313 (license license:bsd-3)))
314
ee448389
RW
315(define-public ghc-tasty-expected-failure
316 (package
317 (name "ghc-tasty-expected-failure")
665615e9 318 (version "0.11.1.1")
ee448389
RW
319 (source
320 (origin
321 (method url-fetch)
322 (uri (string-append "https://hackage.haskell.org/package/"
323 "tasty-expected-failure/tasty-expected-failure-"
324 version ".tar.gz"))
325 (sha256
326 (base32
665615e9 327 "1i2s809m644b7hgiblqay9j364r3fjj1rwbrahsn1pgr5q6mr6ji"))))
ee448389
RW
328 (build-system haskell-build-system)
329 (inputs
330 `(("ghc-tagged" ,ghc-tagged)
331 ("ghc-tasty" ,ghc-tasty)))
332 (home-page "http://github.com/nomeata/tasty-expected-failure")
333 (synopsis "Mark tasty tests as failure expected")
334 (description
335 "With the function @code{Test.Tasty.ExpectedFailure.expectFail} in the
336provided module @code{Test.Tasty.ExpectedFailure}, you can mark that you
337expect test cases to fail, and not to pass. This can be used for test-driven
338development.")
339 (license license:expat)))
340
a06b9b50
RW
341(define-public ghc-quickcheck-instances
342 (package
343 (name "ghc-quickcheck-instances")
cdccdec1 344 (version "0.3.18")
a06b9b50
RW
345 (source
346 (origin
347 (method url-fetch)
348 (uri (string-append
349 "https://hackage.haskell.org/package/"
350 "quickcheck-instances/quickcheck-instances-"
351 version ".tar.gz"))
352 (sha256
353 (base32
cdccdec1 354 "1bh1pzz5fdcqvzdcirqxna6fnjms02min5md716299g5niz46w55"))))
a06b9b50 355 (build-system haskell-build-system)
cdccdec1 356 (arguments
fc042487
TS
357 `(#:cabal-revision
358 ("1" "1sngfq3v71bvgjsl8cj5kh65m3fziwy8dkvwjzs0kxfrzr87faly")))
a06b9b50 359 (inputs
04a69991
RW
360 `(("ghc-quickcheck" ,ghc-quickcheck)
361 ("ghc-base-compat" ,ghc-base-compat)
362 ("ghc-case-insensitive" ,ghc-case-insensitive)
a06b9b50 363 ("ghc-hashable" ,ghc-hashable)
04a69991 364 ("ghc-old-time" ,ghc-old-time)
a06b9b50 365 ("ghc-scientific" ,ghc-scientific)
04a69991
RW
366 ("ghc-tagged" ,ghc-tagged)
367 ("ghc-text" ,ghc-text)
368 ("ghc-transformers-compat" ,ghc-transformers-compat)
369 ("ghc-unordered-containers" ,ghc-unordered-containers)
370 ("ghc-uuid-types" ,ghc-uuid-types)
371 ("ghc-vector" ,ghc-vector)))
372 (home-page "https://github.com/aslatter/qc-instances")
a06b9b50
RW
373 (synopsis "Common quickcheck instances")
374 (description "This package provides QuickCheck instances for types
375provided by the Haskell Platform.")
376 (license license:bsd-3)))
377
378(define-public ghc-quickcheck-unicode
379 (package
380 (name "ghc-quickcheck-unicode")
03de2634 381 (version "1.0.1.0")
a06b9b50
RW
382 (source
383 (origin
384 (method url-fetch)
385 (uri (string-append
03de2634
TGR
386 "https://hackage.haskell.org/package/quickcheck-unicode/"
387 "quickcheck-unicode-" version ".tar.gz"))
a06b9b50
RW
388 (sha256
389 (base32
03de2634 390 "0s43s1bzbg3gwsjgm7fpyksd1339f0m26dlw2famxwyzgvm0a80k"))))
a06b9b50
RW
391 (build-system haskell-build-system)
392 (inputs `(("ghc-quickcheck" ,ghc-quickcheck)))
393 (home-page
394 "https://github.com/bos/quickcheck-unicode")
395 (synopsis "Generator functions Unicode-related tests")
396 (description "This package provides generator and shrink functions for
397testing Unicode-related software.")
398 (license license:bsd-3)))
399
400(define-public ghc-quickcheck-io
401 (package
402 (name "ghc-quickcheck-io")
bb0e9ca4 403 (version "0.2.0")
a06b9b50
RW
404 (source
405 (origin
406 (method url-fetch)
407 (uri (string-append
408 "https://hackage.haskell.org/package/quickcheck-io/quickcheck-io-"
409 version
410 ".tar.gz"))
411 (sha256
412 (base32
bb0e9ca4 413 "08k4v7pkgjf30pv5j2dfv1gqv6hclxlniyq2sps8zq4zswcr2xzv"))))
a06b9b50
RW
414 (build-system haskell-build-system)
415 (inputs
416 `(("ghc-quickcheck" ,ghc-quickcheck)
417 ("ghc-hunit" ,ghc-hunit)))
418 (home-page
419 "https://github.com/hspec/quickcheck-io#readme")
420 (synopsis "Use HUnit assertions as QuickCheck properties")
421 (description "This package provides an orphan instance that allows you to
422use HUnit assertions as QuickCheck properties.")
423 (license license:expat)))
424
425(define-public ghc-quickcheck
426 (package
427 (name "ghc-quickcheck")
09b52698 428 (version "2.11.3")
a06b9b50
RW
429 (outputs '("out" "doc"))
430 (source
431 (origin
432 (method url-fetch)
433 (uri (string-append
434 "https://hackage.haskell.org/package/QuickCheck/QuickCheck-"
435 version
436 ".tar.gz"))
437 (sha256
438 (base32
09b52698 439 "0xhqk35fkzlbjcqbabg6962jkv8d688nzmz7ng4bm84x2d95d328"))))
a06b9b50
RW
440 (build-system haskell-build-system)
441 (arguments
09b52698 442 `(#:tests? #f)) ; FIXME: currently missing libraries used for tests.
a06b9b50 443 (inputs
7291ad1e
RW
444 `(("ghc-random" ,ghc-random)
445 ("ghc-tf-random" ,ghc-tf-random)))
446 (home-page "https://github.com/nick8325/quickcheck")
447 (synopsis "Automatic testing of Haskell programs")
a06b9b50 448 (description
7291ad1e
RW
449 "QuickCheck is a library for random testing of program properties. The
450programmer provides a specification of the program, in the form of properties
451which functions should satisfy, and QuickCheck then tests that the properties
452hold in a large number of randomly generated cases. Specifications are
453expressed in Haskell, using combinators defined in the QuickCheck library.")
a06b9b50
RW
454 (license license:bsd-3)))
455
456(define-public ghc-test-framework
457 (package
458 (name "ghc-test-framework")
bc8bda50 459 (version "0.8.2.0")
a06b9b50
RW
460 (source
461 (origin
462 (method url-fetch)
463 (uri (string-append "https://hackage.haskell.org/package/test-framework/"
464 "test-framework-" version ".tar.gz"))
465 (sha256
466 (base32
bc8bda50 467 "1hhacrzam6b8f10hyldmjw8pb7frdxh04rfg3farxcxwbnhwgbpm"))))
a06b9b50 468 (build-system haskell-build-system)
7fa02bc7 469 (arguments
bc8bda50
TS
470 `(#:tests? #f ; FIXME: Tests do not build.
471 #:phases
472 (modify-phases %standard-phases
473 (add-before 'configure 'update-constraints
474 (lambda _
475 (substitute* "test-framework.cabal"
476 (("QuickCheck >= 2\\.3 && < 2\\.10")
477 "QuickCheck >= 2.3 && < 2.12")))))))
a06b9b50
RW
478 (native-inputs
479 `(("ghc-hunit" ,ghc-hunit)
480 ("ghc-quickcheck" ,ghc-quickcheck)))
481 (inputs
482 `(("ghc-ansi-terminal" ,ghc-ansi-terminal)
483 ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
484 ("ghc-hostname" ,ghc-hostname)
485 ("ghc-old-locale" ,ghc-old-locale)
486 ("ghc-random" ,ghc-random)
487 ("ghc-regex-posix" ,ghc-regex-posix)
488 ("ghc-xml" ,ghc-xml)
bc8bda50
TS
489 ("ghc-libxml" ,ghc-libxml)
490 ("ghc-semigroups" ,ghc-semigroups-bootstrap)))
a06b9b50
RW
491 (home-page "https://batterseapower.github.io/test-framework/")
492 (synopsis "Framework for running and organising tests")
493 (description
494 "This package allows tests such as QuickCheck properties and HUnit test
495cases to be assembled into test groups, run in parallel (but reported in
496deterministic order, to aid diff interpretation) and filtered and controlled
497by command line options. All of this comes with colored test output, progress
498reporting and test statistics output.")
499 (license license:bsd-3)))
500
501(define-public ghc-test-framework-hunit
502 (package
503 (name "ghc-test-framework-hunit")
08bb5bbb 504 (version "0.3.0.2")
a06b9b50
RW
505 (source
506 (origin
507 (method url-fetch)
508 (uri (string-append "https://hackage.haskell.org/package/"
509 "test-framework-hunit/test-framework-hunit-"
510 version ".tar.gz"))
511 (sha256
512 (base32
08bb5bbb 513 "1y0b6vg8nfm43v90lxxcydhi6qlxhfy4vpxbzm5ic2w55bh8xjwm"))))
a06b9b50 514 (build-system haskell-build-system)
a5f7a5f6 515 (arguments
aeb1c6ab
TS
516 `(#:cabal-revision
517 ("3" "0i9mlalv7cl1iq43ld5myrnpszq5rxmd79hk495dcb08rglhgl3z")))
a06b9b50
RW
518 (inputs
519 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
520 ("ghc-hunit" ,ghc-hunit)
521 ("ghc-test-framework" ,ghc-test-framework)))
522 (home-page "https://batterseapower.github.io/test-framework/")
523 (synopsis "HUnit support for test-framework")
524 (description
525 "This package provides HUnit support for the test-framework package.")
526 (license license:bsd-3)))
527
528(define-public ghc-test-framework-quickcheck2
529 (package
530 (name "ghc-test-framework-quickcheck2")
e5199a2c 531 (version "0.3.0.4")
a06b9b50
RW
532 (source
533 (origin
534 (method url-fetch)
535 (uri (string-append "https://hackage.haskell.org/package/"
536 "test-framework-quickcheck2/"
537 "test-framework-quickcheck2-" version ".tar.gz"))
538 (sha256
539 (base32
e5199a2c 540 "0vj834337r6jzr3258cv68ly2sv5999mklpsrfngyk51kywsyqyp"))))
a06b9b50 541 (build-system haskell-build-system)
c2d2f275
TS
542 (arguments
543 `(#:cabal-revision
544 ("1" "147ngmfdkskyg7mwsp5w73a4dbx3rp5s38bci3z03kn1m093lxff")))
a06b9b50
RW
545 (inputs
546 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
547 ("ghc-quickcheck" ,ghc-quickcheck)
548 ("ghc-random" ,ghc-random)
549 ("ghc-test-framework" ,ghc-test-framework)))
550 (home-page "https://batterseapower.github.io/test-framework/")
551 (synopsis "QuickCheck2 support for test-framework")
552 (description
553 "This packages provides QuickCheck2 support for the test-framework
554package.")
555 (license license:bsd-3)))
556
557(define-public ghc-test-framework-th
558 (package
559 (name "ghc-test-framework-th")
560 (version "0.2.4")
561 (source
562 (origin
563 (method url-fetch)
564 (uri (string-append "https://hackage.haskell.org/package/"
565 "test-framework-th-" version "/"
566 "test-framework-th-" version ".tar.gz"))
567 (sha256
568 (base32
569 "12lw7yj02jb9s0i7rb98jjam43j2h0gzmnbj9zi933fx7sg0sy4b"))))
570 (build-system haskell-build-system)
571 (inputs
572 `(("ghc-test-framework" ,ghc-test-framework)
573 ("ghc-language-haskell-extract" ,ghc-language-haskell-extract)
574 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
575 ("ghc-regex-posix" ,ghc-regex-posix)))
576 (home-page "https://github.com/finnsson/test-generator")
577 (synopsis "Auto generate the HUnit- and Quickcheck-bulk-code
578using Template Haskell")
579 (description "This library contains two functions:
580@code{defaultMainGenerator} and @code{testGroupGenerator}.
581
582@code{defaultMainGenerator} will extract all functions beginning with
583@code{case_}, @code{prop_}, or @code{test_} in the module and put them in a
584@code{testGroup}.
585
586@code{testGroupGenerator} is like @code{defaultMainGenerator} but without
587@code{defaultMain}. It is useful if you need a function for the testgroup
588\(e.g. if you want to be able to call the testgroup from another module).")
589 (license license:bsd-3)))
590
591(define-public ghc-hunit
592 (package
593 (name "ghc-hunit")
f1ac3bba 594 (version "1.6.0.0")
a06b9b50
RW
595 (outputs '("out" "doc"))
596 (source
597 (origin
598 (method url-fetch)
f1ac3bba
RW
599 (uri (string-append "https://hackage.haskell.org/package/HUnit/"
600 "HUnit-" version ".tar.gz"))
a06b9b50
RW
601 (sha256
602 (base32
f1ac3bba 603 "1pnhwqq5v8h48gbp3ibv3skfj25mf4zs5svxcavq93p9cswycj3l"))))
a06b9b50 604 (build-system haskell-build-system)
f1ac3bba
RW
605 (inputs
606 ;; We cannot use ghc-call-stack there, because it depends on
607 ;; ghc-nanospec, which depends on ghc-hunit.
608 `(("ghc-call-stack" ,ghc-call-stack-boot)))
a06b9b50
RW
609 (home-page "http://hunit.sourceforge.net/")
610 (synopsis "Unit testing framework for Haskell")
611 (description
612 "HUnit is a unit testing framework for Haskell, inspired by the
613JUnit tool for Java.")
614 (license license:bsd-3)))
615
616(define-public hspec-discover
617 (package
618 (name "hspec-discover")
8d04a5c9 619 (version "2.5.5")
a06b9b50
RW
620 (source
621 (origin
622 (method url-fetch)
8d04a5c9
RW
623 (uri (string-append "https://hackage.haskell.org/package/"
624 "hspec-discover/hspec-discover-"
625 version ".tar.gz"))
a06b9b50
RW
626 (sha256
627 (base32
8d04a5c9 628 "04aidzi91ccr9bygmfkjzshz34z9vh8wvqj4zinx2clxq6r7gqfz"))))
a06b9b50 629 (build-system haskell-build-system)
8d04a5c9
RW
630 (native-inputs
631 `(("ghc-quickcheck" ,ghc-quickcheck)
632 ("ghc-hspec-meta" ,ghc-hspec-meta)))
78724a5a 633 (home-page "https://hspec.github.io/")
a06b9b50
RW
634 (synopsis "Automatically discover and run Hspec tests")
635 (description "hspec-discover is a tool which automatically discovers and
636runs Hspec tests.")
637 (license license:expat)))
638
639(define-public ghc-hspec-core
640 (package
641 (name "ghc-hspec-core")
3b8e4774 642 (version "2.5.5")
a06b9b50
RW
643 (source
644 (origin
645 (method url-fetch)
3b8e4774
RW
646 (uri (string-append "https://hackage.haskell.org/package/hspec-core/"
647 "hspec-core-" version ".tar.gz"))
a06b9b50
RW
648 (sha256
649 (base32
3b8e4774 650 "1vfrqlpn32s9wiykmkxbnrnd5p56yznw20pf8fwzw78ar4wpz55x"))))
a06b9b50
RW
651 (build-system haskell-build-system)
652 (arguments `(#:tests? #f)) ; FIXME: testing libraries are missing.
653 (inputs
654 `(("ghc-setenv" ,ghc-setenv)
655 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
656 ("ghc-async" ,ghc-async)
3b8e4774 657 ("ghc-clock" ,ghc-clock)
a06b9b50
RW
658 ("ghc-quickcheck-io" ,ghc-quickcheck-io)
659 ("ghc-hunit" ,ghc-hunit)
660 ("ghc-quickcheck" ,ghc-quickcheck)
661 ("ghc-hspec-expectations" ,ghc-hspec-expectations)
662 ("ghc-silently" ,ghc-silently)))
78724a5a 663 (home-page "https://hspec.github.io/")
a06b9b50
RW
664 (synopsis "Testing framework for Haskell")
665 (description "This library exposes internal types and functions that can
666be used to extend Hspec's functionality.")
667 (license license:expat)))
668
669(define-public ghc-hspec-meta
670 (package
671 (name "ghc-hspec-meta")
31caca65 672 (version "2.4.6")
a06b9b50
RW
673 (source
674 (origin
675 (method url-fetch)
31caca65
RW
676 (uri (string-append "https://hackage.haskell.org/package/hspec-meta/"
677 "hspec-meta-" version ".tar.gz"))
a06b9b50
RW
678 (sha256
679 (base32
31caca65 680 "0qmvk01n79j6skn79r6zalg2pd0x0nqqn9qn8mhg0pgyzcdnfc9b"))))
a06b9b50
RW
681 (build-system haskell-build-system)
682 (inputs
683 `(("ghc-quickcheck" ,ghc-quickcheck)
684 ("ghc-hunit" ,ghc-hunit)
685 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
686 ("ghc-async" ,ghc-async)
687 ("ghc-hspec-expectations" ,ghc-hspec-expectations)
688 ("ghc-setenv" ,ghc-setenv)
689 ("ghc-random" ,ghc-random)
690 ("ghc-quickcheck-io" ,ghc-quickcheck-io)))
78724a5a 691 (home-page "https://hspec.github.io/")
a06b9b50
RW
692 (synopsis "Version of Hspec to test Hspec itself")
693 (description "This library provides a stable version of Hspec which is
694used to test the in-development version of Hspec.")
695 (license license:expat)))
696
697(define-public ghc-hspec
698 (package
699 (name "ghc-hspec")
c2c8d998 700 (version "2.5.5")
a06b9b50
RW
701 (source
702 (origin
703 (method url-fetch)
c2c8d998
RW
704 (uri (string-append "https://hackage.haskell.org/package/hspec/"
705 "hspec-" version ".tar.gz"))
a06b9b50
RW
706 (sha256
707 (base32
c2c8d998 708 "1yv4k5b5kkig2q3waj28587sq28wms7wfav5a3lq4dra6jybimfm"))))
a06b9b50
RW
709 (build-system haskell-build-system)
710 (inputs
711 `(("ghc-hspec-core" ,ghc-hspec-core)
712 ("hspec-discover" ,hspec-discover)
713 ("ghc-hspec-expectations" ,ghc-hspec-expectations)
714 ("ghc-quickcheck" ,ghc-quickcheck)
715 ("ghc-hunit" ,ghc-hunit)
716 ("ghc-stringbuilder" ,ghc-stringbuilder)
717 ("ghc-hspec-meta" ,ghc-hspec-meta)))
78724a5a 718 (home-page "https://hspec.github.io/")
a06b9b50
RW
719 (synopsis "Testing Framework for Haskell")
720 (description "This library provides the Hspec testing framework for
721Haskell, inspired by the Ruby library RSpec.")
722 (license license:expat)))
723
724(define-public ghc-hspec-contrib
725 (package
726 (name "ghc-hspec-contrib")
33a07859 727 (version "0.5.0")
a06b9b50
RW
728 (source (origin
729 (method url-fetch)
730 (uri (string-append "https://hackage.haskell.org/package/"
731 "hspec-contrib/hspec-contrib-"
732 version ".tar.gz"))
733 (sha256
734 (base32
33a07859 735 "13579xdqwbsy8k0vxdcvgy932d4p76mij1rzkzbpqbspfn7399yv"))))
a06b9b50
RW
736 (build-system haskell-build-system)
737 (inputs
738 `(("ghc-hspec-core" ,ghc-hspec-core)
739 ("ghc-hunit" ,ghc-hunit)
740 ("ghc-hspec" ,ghc-hspec)
741 ("ghc-quickcheck" ,ghc-quickcheck)))
742 (native-inputs
743 `(("hspec-discover" ,hspec-discover)))
78724a5a 744 (home-page "https://hspec.github.io/")
a06b9b50
RW
745 (synopsis "Contributed functionality for Hspec")
746 (description
747 "This package provides contributed Hspec extensions.")
748 (license license:expat)))
749
750(define-public ghc-hspec-expectations
751 (package
752 (name "ghc-hspec-expectations")
15fb81e5 753 (version "0.8.2")
a06b9b50
RW
754 (source
755 (origin
756 (method url-fetch)
15fb81e5
RW
757 (uri (string-append "https://hackage.haskell.org/package/"
758 "hspec-expectations/hspec-expectations-"
759 version ".tar.gz"))
a06b9b50
RW
760 (sha256
761 (base32
15fb81e5 762 "1vxl9zazbaapijr6zmcj72j9wf7ka1pirrjbwddwwddg3zm0g5l1"))))
a06b9b50 763 (build-system haskell-build-system)
15fb81e5
RW
764 ;; Tests depend on ghc-nanospec.
765 (arguments '(#:tests? #f))
a06b9b50
RW
766 (inputs `(("ghc-hunit" ,ghc-hunit)))
767 (home-page "https://github.com/sol/hspec-expectations")
768 (synopsis "Catchy combinators for HUnit")
769 (description "This library provides catchy combinators for HUnit, see
770@uref{https://github.com/sol/hspec-expectations#readme, the README}.")
771 (license license:expat)))
a54b7441
RW
772
773(define-public ghc-nanospec
774 (package
775 (name "ghc-nanospec")
776 (version "0.2.2")
777 (source
778 (origin
779 (method url-fetch)
780 (uri (string-append "https://hackage.haskell.org/package/"
781 "nanospec/nanospec-"
782 version ".tar.gz"))
783 (sha256
784 (base32
785 "1rcmhl9bhyfvanalnf1r86wkx6rq6wdvagnw1h011jcnnb1cq56g"))))
786 (build-system haskell-build-system)
787 (inputs
788 `(("ghc-hspec" ,ghc-hspec)
789 ("ghc-silently" ,ghc-silently)))
790 (home-page "https://github.com/hspec/nanospec#readme")
791 (synopsis "Lightweight implementation of a subset of Hspec's API")
792 (description
793 "Nanospec is a lightweight implementation of a subset of Hspec's API with
794minimal dependencies.")
795 (license license:expat)))
47a6582b 796
797(define-public ghc-crypto-cipher-tests
798 (package
799 (name "ghc-crypto-cipher-tests")
800 (version "0.0.11")
801 (source
802 (origin
803 (method url-fetch)
804 (uri (string-append "https://hackage.haskell.org/package/"
805 "crypto-cipher-tests-" version "/"
806 "crypto-cipher-tests-" version ".tar.gz"))
807 (sha256
808 (base32
809 "19wqignlq90qwpam01hnmmrxaxh5lkax9l1l6rlbi4a07nvp1dnz"))))
810 (build-system haskell-build-system)
811 (inputs `(("ghc-quickcheck" ,ghc-quickcheck)
47a6582b 812 ("ghc-hunit" ,ghc-hunit)
813 ("ghc-test-framework" ,ghc-test-framework)
814 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
815 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
816 ("ghc-byteable" ,ghc-byteable)
817 ("ghc-securemem" ,ghc-securemem)
818 ("ghc-crypto-cipher-types" ,ghc-crypto-cipher-types)))
819 (home-page "https://github.com/vincenthz/hs-crypto-cipher")
820 (synopsis "Generic cryptography cipher tests for Haskell")
821 (description " This Haskell package contains generic tests for
822cryptographic ciphers, and is used by the test runners of various Haskell
823implementations of cryptographic ciphers.")
824 (license license:bsd-3)))