git.iko.soy/typeable/nixpkgs
on master help sign in
Adds ocaml-uuseg

Uuseg is an OCaml library for segmenting Unicode text. It implements the locale independent Unicode text segmentation algorithms to detect grapheme cluster, word and sentence boundaries and the Unicode line breaking algorithm to detect line break opportunities. Homepage: http://erratique.ch/software/uuseg

commit2335ec0b4057b994831d22e16272b4c06000af16 authorVincent Laporte <Vincent.Laporte@gmail.com> dateSun 28 Dec 2014, 14:27 (12 years ago) parentda1f857
2 files changed+48
pkgs/development/ocaml-modules/uuseg/default.nix+47 pkgs/top-level/all-packages.nix+1
pkgs/development/ocaml-modules/uuseg/default.nixnew file+47
@@ -0,0 +1,47 @@
1+{ stdenv, fetchurl, ocaml, findlib, opam, uucp, uutf, cmdliner }:
2+
3+let
4+ inherit (stdenv.lib) getVersion versionAtLeast;
5+
6+ pname = "uuseg";
7+ version = "0.8.0";
8+ webpage = "http://erratique.ch/software/${pname}";
9+in
10+
11+assert versionAtLeast (getVersion ocaml) "4.01";
12+
13+stdenv.mkDerivation {
14+
15+ name = "ocaml-${pname}-${version}";
16+
17+ src = fetchurl {
18+ url = "${webpage}/releases/${pname}-${version}.tbz";
19+ sha256 = "00n4zi8dyw2yzi4nr2agcrr33b0q4dr9mgnkczipf4c0gm5cm50h";
20+ };
21+
22+ buildInputs = [ ocaml findlib opam cmdliner ];
23+ propagatedBuildInputs = [ uucp uutf ];
24+
25+ createFindlibDestdir = true;
26+
27+ unpackCmd = "tar xjf $src";
28+
29+ buildPhase = ''
30+ ocaml pkg/build.ml \
31+ native=true native-dynlink=true \
32+ uutf=true cmdliner=true
33+ '';
34+
35+ installPhase = ''
36+ opam-installer --script --prefix=$out ${pname}.install | sh
37+ ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname}
38+ '';
39+
40+ meta = with stdenv.lib; {
41+ description = "An OCaml library for segmenting Unicode text";
42+ homepage = "${webpage}";
43+ platforms = ocaml.meta.platforms;
44+ license = licenses.bsd3;
45+ maintainers = [ maintainers.vbgl ];
46+ };
47+}
pkgs/top-level/all-packages.nix+1
@@ -3819,6 +3819,7 @@ let
38193819 uucd = callPackage ../development/ocaml-modules/uucd { };
38203820 uucp = callPackage ../development/ocaml-modules/uucp { };
38213821 uunf = callPackage ../development/ocaml-modules/uunf { };
3822+ uuseg = callPackage ../development/ocaml-modules/uuseg { };
38223823 uutf = callPackage ../development/ocaml-modules/uutf { };
38233824
38243825 vg = callPackage ../development/ocaml-modules/vg { };