2021-01-11 12:49:15 +00:00
|
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild }:
|
2018-09-05 18:12:13 +01:00
|
|
|
|
|
2019-04-19 13:54:27 +01:00
|
|
|
|
stdenv.mkDerivation ({
|
2018-09-05 18:12:13 +01:00
|
|
|
|
version = "0.1";
|
2021-11-09 19:42:54 +00:00
|
|
|
|
pname = "ocaml${ocaml.version}-seq";
|
2019-04-19 13:54:27 +01:00
|
|
|
|
|
|
|
|
|
meta = {
|
2021-01-11 12:49:15 +00:00
|
|
|
|
license = lib.licenses.lgpl21;
|
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2019-04-19 13:54:27 +01:00
|
|
|
|
homepage = "https://github.com/c-cube/seq";
|
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
|
};
|
|
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
|
} // (if lib.versionOlder ocaml.version "4.07" then {
|
2018-09-05 18:12:13 +01:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "c-cube";
|
|
|
|
|
repo = "seq";
|
2019-04-19 13:54:27 +01:00
|
|
|
|
rev = "0.1";
|
2018-09-05 18:12:13 +01:00
|
|
|
|
sha256 = "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv";
|
|
|
|
|
};
|
|
|
|
|
|
2021-08-14 13:00:00 +01:00
|
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
|
|
|
|
|
strictDeps = true;
|
2018-09-05 18:12:13 +01:00
|
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
2019-04-19 13:54:27 +01:00
|
|
|
|
meta.description = "Compatibility package for OCaml’s standard iterator type starting from 4.07";
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
src = ./src-base;
|
|
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/seq
|
|
|
|
|
cp META $out/lib/ocaml/${ocaml.version}/site-lib/seq
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta.description = "dummy backward-compatibility package for iterators";
|
|
|
|
|
|
|
|
|
|
}))
|