2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let param =
|
2021-01-15 22:18:51 +00:00
|
|
|
if lib.versionAtLeast ocaml.version "4.02" then {
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "0.6";
|
|
|
|
sha256 = "18wpyxblz9jh5bfp0hpffnd0q8cq1b0dqp0f36vhqydfknlnpx8y";
|
|
|
|
} else {
|
|
|
|
version = "0.5";
|
|
|
|
sha256 = "1j17rhifdjv1z262dma148ywg34x0zjn8vczdrnkwajsm4qg1hw3";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
|
|
|
|
"functory is not available for OCaml ${ocaml.version}"
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation {
|
2022-02-10 20:34:41 +00:00
|
|
|
pname = "ocaml${ocaml.version}-functory";
|
|
|
|
inherit (param) version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.lri.fr/~filliatr/functory/download/functory-${param.version}.tar.gz";
|
|
|
|
inherit (param) sha256;
|
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installTargets = [ "ocamlfind-install" ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.lri.fr/~filliatr/functory/";
|
|
|
|
description = "A distributed computing library for Objective Caml which facilitates distributed execution of parallelizable computations in a seamless fashion";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2022-05-18 14:49:53 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|