Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 74 lines 1.4 kB view raw
1{ 2 lib, 3 ocaml, 4 version ? if lib.versionAtLeast ocaml.version "5.1" then "1.2" else "0.12", 5 buildDunePackage, 6 bigstringaf, 7 cstruct, 8 domain-local-await, 9 fetchurl, 10 fmt, 11 hmap, 12 lwt-dllist, 13 mtime, 14 optint, 15 psq, 16 alcotest, 17 crowbar, 18 mdx, 19}: 20 21let 22 param = 23 { 24 "0.12" = { 25 minimalOCamlVersion = "5.0"; 26 hash = "sha256-2EhHzoX/t4ZBSWrSS+PGq1zCxohc7a1q4lfsrFnZJqA="; 27 }; 28 "1.2" = { 29 minimalOCamlVersion = "5.1"; 30 hash = "sha256-N5LpEr2NSUuy449zCBgl5NISsZcM8sHxspZsqp/WvEA="; 31 }; 32 } 33 ."${version}"; 34in 35buildDunePackage rec { 36 pname = "eio"; 37 inherit version; 38 inherit (param) minimalOCamlVersion; 39 40 src = fetchurl { 41 url = "https://github.com/ocaml-multicore/${pname}/releases/download/v${version}/${pname}-${version}.tbz"; 42 inherit (param) hash; 43 }; 44 45 propagatedBuildInputs = [ 46 bigstringaf 47 cstruct 48 domain-local-await 49 fmt 50 hmap 51 lwt-dllist 52 mtime 53 optint 54 psq 55 ]; 56 57 checkInputs = [ 58 alcotest 59 crowbar 60 mdx 61 ]; 62 63 nativeCheckInputs = [ 64 mdx.bin 65 ]; 66 67 meta = { 68 homepage = "https://github.com/ocaml-multicore/${pname}"; 69 changelog = "https://github.com/ocaml-multicore/${pname}/raw/v${version}/CHANGES.md"; 70 description = "Effects-Based Parallel IO for OCaml"; 71 license = with lib.licenses; [ isc ]; 72 maintainers = with lib.maintainers; [ toastal ]; 73 }; 74}