haskell-check.scm 30 KB

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