1{ 2 stdenv, 3 lib, 4 fetchurl, 5 ocaml, 6 findlib, 7 ocamlbuild, 8 topkg, 9 faraday, 10}: 11 12if lib.versionOlder ocaml.version "4.3" then 13 throw "farfadet is not available for OCaml ${ocaml.version}" 14else 15 16 stdenv.mkDerivation rec { 17 pname = "ocaml${ocaml.version}-farfadet"; 18 version = "0.3"; 19 20 src = fetchurl { 21 url = "https://github.com/oklm-wsh/Farfadet/releases/download/v${version}/farfadet-${version}.tbz"; 22 sha256 = "0nlafnp0pwx0n4aszpsk6nvcvqi9im306p4jhx70si7k3xprlr2j"; 23 }; 24 25 nativeBuildInputs = [ 26 ocaml 27 findlib 28 ocamlbuild 29 topkg 30 ]; 31 buildInputs = [ topkg ]; 32 33 propagatedBuildInputs = [ faraday ]; 34 35 strictDeps = true; 36 37 inherit (topkg) buildPhase installPhase; 38 39 meta = { 40 description = "Printf-like for Faraday library"; 41 homepage = "https://github.com/oklm-wsh/Farfadet"; 42 license = lib.licenses.mit; 43 maintainers = [ lib.maintainers.vbgl ]; 44 inherit (ocaml.meta) platforms; 45 }; 46 }