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