From 310623ad6c94ac3d8a2ca7fc9a4b08e97e8eb0a1 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 9 Jan 2015 10:28:35 +0100 Subject: [PATCH] Addg ocaml-uri RFC3986 URI parsing library for OCaml Homepage: https://github.com/mirage/ocaml-uri --- .../development/ocaml-modules/uri/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/ocaml-modules/uri/default.nix diff --git a/pkgs/development/ocaml-modules/uri/default.nix b/pkgs/development/ocaml-modules/uri/default.nix new file mode 100644 index 000000000000..a00a24081599 --- /dev/null +++ b/pkgs/development/ocaml-modules/uri/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchgit, ocaml, findlib, re, sexplib, stringext }: + +let version = "1.7.2"; in + +stdenv.mkDerivation { + name = "ocaml-uri-${version}"; + + src = fetchgit { + url = https://github.com/mirage/ocaml-uri.git; + rev = "refs/tags/v${version}"; + sha256 = "19rq68dzvqzpqc2zvrk5sj1iklknnyrlbcps2vb8iw4cjlrnnaa1"; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 454e31f57d9b..ac17a5c876a6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3880,6 +3880,11 @@ let uucd = callPackage ../development/ocaml-modules/uucd { }; uucp = callPackage ../development/ocaml-modules/uucp { }; uunf = callPackage ../development/ocaml-modules/uunf { }; + + uri = callPackage ../development/ocaml-modules/uri { + sexplib = ocaml_sexplib; + }; + uuseg = callPackage ../development/ocaml-modules/uuseg { }; uutf = callPackage ../development/ocaml-modules/uutf { };