Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildDunePackage, fetchFromGitHub, ocaml, cpu, domainslib }:
2
3let params =
4 if lib.versionAtLeast ocaml.version "5.00" then {
5 version = "13.0.1";
6 hash = "sha256-OYa0uLsDyzjmXZgWcYUxLhqco4Kp/icfDamNe3En5JQ=";
7 propagatedBuildInputs = [ domainslib ];
8 } else {
9 version = "12.2.2";
10 hash = "sha256-woZ4XJqqoRr/7mDurXYvTbSUUcLBEylzVYBQp1BAOqc=";
11 propagatedBuildInputs = [ cpu ];
12 }
13; in
14
15buildDunePackage rec {
16 pname = "parany";
17 inherit (params) version;
18
19 duneVersion = "3";
20 minimalOCamlVersion = "4.08";
21
22 src = fetchFromGitHub {
23 owner = "UnixJunkie";
24 repo = pname;
25 rev = "v${version}";
26 inherit (params) hash;
27 };
28
29 inherit (params) propagatedBuildInputs;
30
31 meta = with lib; {
32 inherit (src.meta) homepage;
33 description = "Generalized map/reduce for multicore computing";
34 maintainers = [ maintainers.bcdarwin ];
35 license = licenses.lgpl2;
36 };
37}