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
1 changed files with 14 additions and 20 deletions

View File

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