summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/uri/default.nix
blob: c846cca1282f4d4f8e98fb8c762e8525b76a4b70 (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
{ stdenv, fetchurl, ocaml, findlib, jbuilder, ppx_sexp_conv, ounit
, re, sexplib, stringext
}:

stdenv.mkDerivation rec {
  version = "1.9.6";
  name = "ocaml${ocaml.version}-uri-${version}";

  src = fetchurl {
    url = "https://github.com/mirage/ocaml-uri/releases/download/v${version}/uri-${version}.tbz";
    sha256 = "1m845rwd70wi4iijkrigyz939m1x84ba70hvv0d9sgk6971w4kz0";
  };

  unpackCmd = "tar -xjf $curSrc";

  buildInputs = [ ocaml findlib jbuilder ounit ];
  propagatedBuildInputs = [ ppx_sexp_conv re sexplib stringext ];

  buildPhase = "jbuilder build";

  doCheck = true;
  checkPhase = "jbuilder runtest";

  inherit (jbuilder) installPhase;

  meta = {
    homepage = "https://github.com/mirage/ocaml-uri";
    description = "RFC3986 URI parsing library for OCaml";
    license = stdenv.lib.licenses.isc;
    maintainers = [ stdenv.lib.maintainers.vbgl ];
    inherit (ocaml.meta) platforms;
  };
}