2016-09-14 01:21:56 +01:00
|
|
|
{ stdenv, fetchzip, ocaml, findlib, re, sexplib_p4, stringext, ounit }:
|
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";
|
|
|
|
|
2015-07-01 19:20:19 +01:00
|
|
|
let version = "1.9.1"; 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";
|
2015-07-01 19:20:19 +01:00
|
|
|
sha256 = "0v3jxqgyi4kj92r3x83rszfpnvvzy9lyb913basch4q64yka3w85";
|
2015-01-09 09:28:35 +00:00
|
|
|
};
|
|
|
|
|
2015-07-01 19:20:19 +01:00
|
|
|
buildInputs = [ ocaml findlib ounit ];
|
2016-09-14 01:21:56 +01:00
|
|
|
propagatedBuildInputs = [ re sexplib_p4 stringext ];
|
2015-01-09 09:28:35 +00:00
|
|
|
|
2015-07-01 19:20:19 +01:00
|
|
|
configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
|
2015-01-09 09:28:35 +00:00
|
|
|
buildPhase = ''
|
|
|
|
ocaml setup.ml -build
|
|
|
|
ocaml setup.ml -doc
|
|
|
|
'';
|
2015-07-01 19:20:19 +01:00
|
|
|
doCheck = true;
|
|
|
|
checkPhase = "ocaml setup.ml -test";
|
2015-01-09 09:28:35 +00:00
|
|
|
installPhase = "ocaml setup.ml -install";
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://github.com/mirage/ocaml-uri;
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2015-01-09 09:28:35 +00:00
|
|
|
description = "RFC3986 URI parsing library for OCaml";
|
|
|
|
license = stdenv.lib.licenses.isc;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ vbgl ];
|
|
|
|
};
|
|
|
|
}
|