From 0f4e9835d7fceba4f192e549ecd24ca7add7e6e3 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 27 Nov 2014 06:53:43 +0000 Subject: [PATCH] Adds ocaml-uucp Uucp is an OCaml library providing efficient access to a selection of character properties of the Unicode character database. Homepage: http://erratique.ch/software/uucp --- .../ocaml-modules/uucp/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/ocaml-modules/uucp/default.nix diff --git a/pkgs/development/ocaml-modules/uucp/default.nix b/pkgs/development/ocaml-modules/uucp/default.nix new file mode 100644 index 00000000000..2ee39cab9f4 --- /dev/null +++ b/pkgs/development/ocaml-modules/uucp/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, ocaml, findlib, opam }: + +let + inherit (stdenv.lib) getVersion versionAtLeast; + + pname = "uucp"; + version = "0.9.0"; + webpage = "http://erratique.ch/software/${pname}"; +in + +assert versionAtLeast (getVersion ocaml) "4.00"; + +stdenv.mkDerivation { + + name = "ocaml-${pname}-${version}"; + + src = fetchurl { + url = "${webpage}/releases/${pname}-${version}.tbz"; + sha256 = "1cwjr16cg03h30r97lnb32g725qi7ma76kr2aly5smc3m413dhqy"; + }; + + buildInputs = [ ocaml findlib opam ]; + + createFindlibDestdir = true; + + unpackCmd = "tar xjf $src"; + + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; + + installPhase = '' + opam-installer --script --prefix=$out ${pname}.install | sh + ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname} + ''; + + meta = with stdenv.lib; { + description = "An OCaml library providing efficient access to a selection of character properties of the Unicode character database"; + homepage = "${webpage}"; + platforms = ocaml.meta.platforms; + license = licenses.bsd3; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 883cfc529a3..41777d983ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3758,6 +3758,7 @@ let sawja = callPackage ../development/ocaml-modules/sawja { }; uucd = callPackage ../development/ocaml-modules/uucd { }; + uucp = callPackage ../development/ocaml-modules/uucp { }; uunf = callPackage ../development/ocaml-modules/uunf { }; uutf = callPackage ../development/ocaml-modules/uutf { };