ocamlPackages.qtest: 2.7 → 2.11

This commit is contained in:
Vincent Laporte 2020-09-21 22:03:49 +02:00 committed by Vincent Laporte
parent 2be541ff7c
commit 8409bdf80a

View File

@ -1,28 +1,22 @@
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, qcheck, ounit }:
{ lib, buildDunePackage, fetchFromGitHub, qcheck }:
if !stdenv.lib.versionAtLeast ocaml.version "4"
then throw "qtest is not available for OCaml ${ocaml.version}"
else
buildDunePackage rec {
pname = "qtest";
version = "2.11";
let version = "2.7"; in
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-qtest-${version}";
src = fetchzip {
url = "https://github.com/vincent-hugot/iTeML/archive/v${version}.tar.gz";
sha256 = "0z72m2drp67qchvsxx4sg2qjrrq8hp6p9kzdx16ibx58pvpw1sh2";
src = fetchFromGitHub {
owner = "vincent-hugot";
repo = pname;
rev = "v${version}";
sha256 = "10fi2093ny8pp3jsi1gdqsllp3lr4r5mfcs2hrm7qvbnhrdbb0g3";
};
buildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ qcheck ounit ];
installFlags = [ "BIN=$(out)/bin" ];
preInstall = "mkdir -p $out/bin";
propagatedBuildInputs = [ qcheck ];
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 ];
description = "Inline (Unit) Tests for OCaml";
inherit (src.meta) homepage;
maintainers = with lib.maintainers; [ vbgl ];
license = lib.licenses.gpl3;
};
}