2016-11-03 02:03:04 +00:00
|
|
|
{ stdenv, buildOcaml, fetchurl, ocaml, findlib, ocamlbuild, opam, uucp, uutf, cmdliner }:
|
2014-12-28 13:27:27 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "uuseg";
|
|
|
|
webpage = "http://erratique.ch/software/${pname}";
|
|
|
|
in
|
|
|
|
|
2016-11-03 02:03:04 +00:00
|
|
|
buildOcaml rec {
|
2014-12-28 13:27:27 +00:00
|
|
|
|
2016-11-03 02:03:04 +00:00
|
|
|
minimumSupportedOcamlVersion = "4.01";
|
2014-12-28 13:27:27 +00:00
|
|
|
|
2016-11-03 02:03:04 +00:00
|
|
|
name = pname;
|
|
|
|
version = "0.9.0";
|
2014-12-28 13:27:27 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${webpage}/releases/${pname}-${version}.tbz";
|
|
|
|
sha256 = "00n4zi8dyw2yzi4nr2agcrr33b0q4dr9mgnkczipf4c0gm5cm50h";
|
|
|
|
};
|
|
|
|
|
2016-11-04 11:24:57 +00:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild opam cmdliner ];
|
|
|
|
propagatedBuildInputs = [ uucp uutf ];
|
2014-12-28 13:27:27 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
unpackCmd = "tar xjf $src";
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
ocaml pkg/build.ml \
|
|
|
|
native=true native-dynlink=true \
|
|
|
|
uutf=true cmdliner=true
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2016-11-04 11:24:57 +00:00
|
|
|
opam-installer --script --prefix=$out ${pname}.install | sh
|
2016-11-03 02:03:04 +00:00
|
|
|
ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/${pname}
|
2014-12-28 13:27:27 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An OCaml library for segmenting Unicode text";
|
|
|
|
homepage = "${webpage}";
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-12-28 13:27:27 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
}
|