1 { lib, stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild }:
3 { pname, version, nativeBuildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; },
4 minimumOCamlVersion ? null,
5 createFindlibDestdir ? true,
10 if args ? minimumOCamlVersion &&
11 lib.versionOlder ocaml.version args.minimumOCamlVersion
12 then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
15 stdenv.mkDerivation (args // {
16 name = "ocaml${ocaml.version}-${pname}-${version}";
18 nativeBuildInputs = [ ocaml findlib ocamlbuild ocaml_oasis ] ++ nativeBuildInputs;
20 inherit createFindlibDestdir;
28 ocaml setup.ml -configure --prefix $OCAMLFIND_DESTDIR --exec-prefix $out
42 ocaml setup.ml -install