@@ -0,0 +1,33 @@
1+{ stdenv, fetchgit, ocaml, findlib, re, sexplib, stringext }:
2+
3+let version = "1.7.2"; in
4+
5+stdenv.mkDerivation {
6+ name = "ocaml-uri-${version}";
7+
8+ src = fetchgit {
9+ url = https://github.com/mirage/ocaml-uri.git;
10+ rev = "refs/tags/v${version}";
11+ sha256 = "19rq68dzvqzpqc2zvrk5sj1iklknnyrlbcps2vb8iw4cjlrnnaa1";
12+ };
13+
14+ buildInputs = [ ocaml findlib ];
15+ propagatedBuildInputs = [ re sexplib stringext ];
16+
17+ configurePhase = "ocaml setup.ml -configure --prefix $out";
18+ buildPhase = ''
19+ ocaml setup.ml -build
20+ ocaml setup.ml -doc
21+ '';
22+ installPhase = "ocaml setup.ml -install";
23+
24+ createFindlibDestdir = true;
25+
26+ meta = {
27+ homepage = https://github.com/mirage/ocaml-uri;
28+ platforms = ocaml.meta.platforms;
29+ description = "RFC3986 URI parsing library for OCaml";
30+ license = stdenv.lib.licenses.isc;
31+ maintainers = with stdenv.lib.maintainers; [ vbgl ];
32+ };
33+}