nixpkgs/pkgs/development/ocaml-modules/qtest/default.nix

29 lines
869 B
Nix
Raw Normal View History

{ 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
2017-10-16 05:49:12 +00:00
let version = "2.7"; in
stdenv.mkDerivation {
2017-10-16 05:49:12 +00:00
name = "ocaml${ocaml.version}-qtest-${version}";
src = fetchzip {
url = "https://github.com/vincent-hugot/iTeML/archive/v${version}.tar.gz";
2017-10-16 05:49:12 +00:00
sha256 = "0z72m2drp67qchvsxx4sg2qjrrq8hp6p9kzdx16ibx58pvpw1sh2";
};
buildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ qcheck ounit ];
2016-09-14 17:04:58 +00:00
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 ];
};
}