forked from mirrors/nixpkgs
2ddd539807
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/ocaml4.05.0-alcotest/versions. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 0.8.2 with grep in /nix/store/q08nmvvkyka038kqhmhbgfqvn97c5wzw-ocaml4.05.0-alcotest-0.8.2 - directory tree listing: https://gist.github.com/5da539318dc6e7b77255ad7f544bb828
42 lines
1.2 KiB
Nix
42 lines
1.2 KiB
Nix
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, topkg, jbuilder
|
|
, cmdliner, astring, fmt, result
|
|
}:
|
|
|
|
let param =
|
|
if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
|
|
version = "0.8.2";
|
|
sha256 = "1zpg079v89mz2dpnh59f9hk5r03wl26skfn43llrv3kg24abjfpf";
|
|
buildInputs = [ jbuilder ];
|
|
buildPhase = "jbuilder build -p alcotest";
|
|
inherit (jbuilder) installPhase;
|
|
} else {
|
|
version = "0.7.2";
|
|
sha256 = "1qgsz2zz5ky6s5pf3j3shc4fjc36rqnjflk8x0wl1fcpvvkr52md";
|
|
buildInputs = [ ocamlbuild topkg ];
|
|
inherit (topkg) buildPhase installPhase;
|
|
};
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "ocaml${ocaml.version}-alcotest-${version}";
|
|
inherit (param) version buildPhase installPhase;
|
|
|
|
src = fetchzip {
|
|
url = "https://github.com/mirage/alcotest/archive/${version}.tar.gz";
|
|
inherit (param) sha256;
|
|
};
|
|
|
|
buildInputs = [ ocaml findlib ] ++ param.buildInputs;
|
|
|
|
propagatedBuildInputs = [ cmdliner astring fmt result ];
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = https://github.com/mirage/alcotest;
|
|
description = "A lightweight and colourful test framework";
|
|
license = stdenv.lib.licenses.isc;
|
|
maintainers = [ maintainers.ericbmerritt ];
|
|
};
|
|
}
|