about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/qtest/default.nix
blob: eb65384fc975a3b90545799874cf3d23d7b4035d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, qcheck, ounit }:

if !stdenv.lib.versionAtLeast ocaml.version "4"
then throw "qtest is not available for OCaml ${ocaml.version}"
else

let version = "2.6"; in

stdenv.mkDerivation {
  name = "ocaml-qtest-${version}";
  src = fetchzip {
    url = "https://github.com/vincent-hugot/iTeML/archive/v${version}.tar.gz";
    sha256 = "1v5c1n5p8rhnisn606fs05q8764lqwgw08w66y5dm8wgmxgmsb3k";
  };

  buildInputs = [ ocaml findlib ocamlbuild ];
  propagatedBuildInputs = [ qcheck ounit ];

  installFlags = [ "BIN=$(out)/bin" ];
  preInstall = "mkdir -p $out/bin";

  meta = {
    description = "Inline (Unit) Tests for OCaml (formerly “qtest”)";
    homepage = https://github.com/vincent-hugot/iTeML;
    platforms = ocaml.meta.platforms or [];
    maintainers = with stdenv.lib.maintainers; [ vbgl ];
  };
}