about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/farfadet/default.nix
blob: 080cc74998df7a789ac73a3dd63b2ca4a9b99f60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg
, faraday
}:

if !stdenv.lib.versionAtLeast ocaml.version "4.3"
then throw "farfadet is not available for OCaml ${ocaml.version}"
else

stdenv.mkDerivation rec {
  name = "ocaml${ocaml.version}-farfadet-${version}";
  version = "0.2";

  src = fetchurl {
    url = "https://github.com/oklm-wsh/Farfadet/releases/download/v${version}/farfadet-${version}.tbz";
    sha256 = "06wvd57c8khpq0c2hvm15zng269zvabsw1lcaqphqdcckl67nsxr";
  };

  unpackCmd = "tar -xjf $curSrc";

  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";
    license = stdenv.lib.licenses.mit;
    maintainers = [ stdenv.lib.maintainers.vbgl ];
    inherit (ocaml.meta) platforms;
  };
}