2017-08-21 05:55:59 +00:00
|
|
|
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, qcheck, ounit }:
|
2015-03-21 08:52:59 +00:00
|
|
|
|
2017-07-08 09:31:11 +00:00
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4"
|
|
|
|
then throw "qtest is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2017-10-16 05:49:12 +00:00
|
|
|
let version = "2.7"; in
|
2015-03-21 08:52:59 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2017-10-16 05:49:12 +00:00
|
|
|
name = "ocaml${ocaml.version}-qtest-${version}";
|
2015-03-21 08:52:59 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/vincent-hugot/iTeML/archive/v${version}.tar.gz";
|
2017-10-16 05:49:12 +00:00
|
|
|
sha256 = "0z72m2drp67qchvsxx4sg2qjrrq8hp6p9kzdx16ibx58pvpw1sh2";
|
2015-03-21 08:52:59 +00:00
|
|
|
};
|
|
|
|
|
2016-10-08 06:44:25 +00:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ];
|
2017-08-21 05:55:59 +00:00
|
|
|
propagatedBuildInputs = [ qcheck ounit ];
|
2015-03-21 08:52:59 +00:00
|
|
|
|
2016-09-14 17:04:58 +00:00
|
|
|
installFlags = [ "BIN=$(out)/bin" ];
|
|
|
|
preInstall = "mkdir -p $out/bin";
|
2015-03-21 08:52:59 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Inline (Unit) Tests for OCaml (formerly “qtest”)";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/vincent-hugot/iTeML";
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2015-03-21 08:52:59 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ vbgl ];
|
|
|
|
};
|
|
|
|
}
|