2021-01-11 12:49:15 +00:00
|
|
|
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg
|
2017-12-05 18:17:54 +00:00
|
|
|
, faraday
|
|
|
|
}:
|
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
if !lib.versionAtLeast ocaml.version "4.3"
|
2017-12-05 18:17:54 +00:00
|
|
|
then throw "farfadet is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-farfadet-${version}";
|
2019-04-06 15:37:32 +01:00
|
|
|
version = "0.3";
|
2017-12-05 18:17:54 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/oklm-wsh/Farfadet/releases/download/v${version}/farfadet-${version}.tbz";
|
2019-04-06 15:37:32 +01:00
|
|
|
sha256 = "0nlafnp0pwx0n4aszpsk6nvcvqi9im306p4jhx70si7k3xprlr2j";
|
2017-12-05 18:17:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ocamlbuild topkg ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ faraday ];
|
|
|
|
|
|
|
|
inherit (topkg) buildPhase installPhase;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A printf-like for Faraday library";
|
|
|
|
homepage = "https://github.com/oklm-wsh/Farfadet";
|
2021-01-11 12:49:15 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2017-12-05 18:17:54 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|