at 18.09-beta 29 lines 858 B view raw
1{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: 2 3if !stdenv.lib.versionAtLeast ocaml.version "4.3" 4then throw "digestif is not available for OCaml ${ocaml.version}" 5else 6 7stdenv.mkDerivation rec { 8 name = "ocaml${ocaml.version}-digestif-${version}"; 9 version = "0.5"; 10 11 src = fetchurl { 12 url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-${version}.tbz"; 13 sha256 = "0fsyfi5ps17j3wjav5176gf6z3a5xcw9aqhcr1gml9n9ayfbkhrd"; 14 }; 15 16 unpackCmd = "tar -xjf $curSrc"; 17 18 buildInputs = [ ocaml findlib ocamlbuild topkg ]; 19 20 inherit (topkg) buildPhase installPhase; 21 22 meta = { 23 description = "Simple hash algorithms in OCaml"; 24 homepage = "https://github.com/mirage/digestif"; 25 license = stdenv.lib.licenses.mit; 26 maintainers = [ stdenv.lib.maintainers.vbgl ]; 27 inherit (ocaml.meta) platforms; 28 }; 29}