2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, camlp4 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
assert lib.versionOlder "4.00" (lib.getVersion ocaml);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
if lib.versionAtLeast ocaml.version "4.06"
|
2020-04-24 23:36:52 +00:00
|
|
|
then throw "fieldslib-109.20.03 is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "ocaml-fieldslib-109.20.03";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://ocaml.janestreet.com/ocaml-core/109.20.00/individual/fieldslib-109.20.03.tar.gz";
|
|
|
|
sha256 = "1dkzk0wf26rhvji80dz1r56dp6x9zqrnp87wldd4pj56jli94vir";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ];
|
|
|
|
propagatedBuildInputs = [ type_conv camlp4 ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://ocaml.janestreet.com/";
|
|
|
|
description = "OCaml syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
|
|
|
platforms = ocaml.meta.platforms or [];
|
|
|
|
};
|
|
|
|
}
|