Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |