Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchurl, 5 ocaml, 6 findlib, 7 ocamlbuild, 8 topkg, 9 result, 10}: 11 12lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07") 13 "rresult is not available for OCaml ${ocaml.version}" 14 15 stdenv.mkDerivation 16 rec { 17 pname = "ocaml${ocaml.version}-rresult"; 18 version = "0.7.0"; 19 src = fetchurl { 20 url = "https://erratique.ch/software/rresult/releases/rresult-${version}.tbz"; 21 sha256 = "sha256-Eap/W4NGDmBDHjFU4+MsBx1G4VHqV2DPJDd4Bb+XVUA="; 22 }; 23 24 nativeBuildInputs = [ 25 ocaml 26 findlib 27 ocamlbuild 28 topkg 29 ]; 30 buildInputs = [ topkg ]; 31 32 propagatedBuildInputs = [ result ]; 33 34 strictDeps = true; 35 36 inherit (topkg) buildPhase installPhase; 37 38 meta = { 39 license = lib.licenses.isc; 40 homepage = "https://erratique.ch/software/rresult"; 41 description = "Result value combinators for OCaml"; 42 maintainers = [ lib.maintainers.vbgl ]; 43 inherit (ocaml.meta) platforms; 44 }; 45 }