2015-06-02 11:23:50 +01:00
|
|
|
{ stdenv, fetchzip, ocaml, findlib, re, sexplib, stringext }:
|
2015-01-09 09:28:35 +00:00
|
|
|
|
2015-06-02 11:23:50 +01:00
|
|
|
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4";
|
|
|
|
|
|
|
|
let version = "1.9.0"; in
|
2015-01-09 09:28:35 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "ocaml-uri-${version}";
|
|
|
|
|
2015-06-02 11:23:50 +01:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/mirage/ocaml-uri/archive/v${version}.tar.gz";
|
|
|
|
sha256 = "13vbv6q7npl2bvvqfw03mav90jcrrvjbdpdp4y8mcjz0iax5ww9b";
|
2015-01-09 09:28:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ];
|
|
|
|
propagatedBuildInputs = [ re sexplib stringext ];
|
|
|
|
|
|
|
|
configurePhase = "ocaml setup.ml -configure --prefix $out";
|
|
|
|
buildPhase = ''
|
|
|
|
ocaml setup.ml -build
|
|
|
|
ocaml setup.ml -doc
|
|
|
|
'';
|
|
|
|
installPhase = "ocaml setup.ml -install";
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://github.com/mirage/ocaml-uri;
|
|
|
|
platforms = ocaml.meta.platforms;
|
|
|
|
description = "RFC3986 URI parsing library for OCaml";
|
|
|
|
license = stdenv.lib.licenses.isc;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ vbgl ];
|
|
|
|
};
|
|
|
|
}
|