1{ lib, buildDunePackage, fetchurl, fetchpatch
2, astring, cmdliner, fmt, re, stdlib-shims, uutf, ocaml-syntax-shims
3}:
4
5buildDunePackage rec {
6 pname = "alcotest";
7 version = "1.7.0";
8
9 src = fetchurl {
10 url = "https://github.com/mirage/alcotest/releases/download/${version}/alcotest-${version}.tbz";
11 hash = "sha256-gSus2zS0XoiZXgfXMGvasvckee8ZlmN/HV0fQWZ5At8=";
12 };
13
14 # Fix tests with OCaml 5.2
15 patches = fetchpatch {
16 url = "https://github.com/mirage/alcotest/commit/aa437168b258db97680021116af176c55e1bd53b.patch";
17 hash = "sha256-cytuJFg4Mft47LsAEcz2zvzyy1wNzMdeLK+cjaFANpo=";
18 };
19
20 nativeBuildInputs = [ ocaml-syntax-shims ];
21
22 propagatedBuildInputs = [ astring cmdliner fmt re stdlib-shims uutf ];
23
24 doCheck = true;
25
26 meta = with lib; {
27 homepage = "https://github.com/mirage/alcotest";
28 description = "Lightweight and colourful test framework";
29 license = licenses.isc;
30 maintainers = [ maintainers.ericbmerritt ];
31 };
32}