lol
1{ lib, stdenv, fetchurl, ocaml, findlib }:
2
3let param =
4 if lib.versionAtLeast ocaml.version "4.02" then {
5 version = "0.6";
6 sha256 = "18wpyxblz9jh5bfp0hpffnd0q8cq1b0dqp0f36vhqydfknlnpx8y";
7 } else {
8 version = "0.5";
9 sha256 = "1j17rhifdjv1z262dma148ywg34x0zjn8vczdrnkwajsm4qg1hw3";
10 };
11in
12
13lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
14 "functory is not available for OCaml ${ocaml.version}"
15
16stdenv.mkDerivation {
17 pname = "ocaml${ocaml.version}-functory";
18 inherit (param) version;
19
20 src = fetchurl {
21 url = "https://www.lri.fr/~filliatr/functory/download/functory-${param.version}.tar.gz";
22 inherit (param) sha256;
23 };
24
25 nativeBuildInputs = [ ocaml findlib ];
26
27 strictDeps = true;
28
29 installTargets = [ "ocamlfind-install" ];
30
31 createFindlibDestdir = true;
32
33 meta = with lib; {
34 homepage = "https://www.lri.fr/~filliatr/functory/";
35 description = "A distributed computing library for Objective Caml which facilitates distributed execution of parallelizable computations in a seamless fashion";
36 license = licenses.lgpl21;
37 maintainers = [ maintainers.vbgl ];
38 inherit (ocaml.meta) platforms;
39 };
40}