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-03 02:03:04 +00:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild opam ];
|
|
|
|
propagatedBuildInputs = [ uucp uutf cmdliner ];
|
2014-12-28 13:27:27 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
unpackCmd = "tar xjf $src";
|
|
|
|
|
|
|
|
buildPhase = ''
|
2016-11-03 02:03:04 +00:00
|
|
|
ocaml pkg/git.ml
|
2014-12-28 13:27:27 +00:00
|
|
|
ocaml pkg/build.ml \
|
|
|
|
native=true native-dynlink=true \
|
|
|
|
uutf=true cmdliner=true
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2016-11-03 02:03:04 +00:00
|
|
|
opam-installer --prefix $out --script | sh
|
|
|
|
ln -s $out/lib/uuseg $out/lib/ocaml/${ocaml.version}/site-lib/
|
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 ];
|
|
|
|
};
|
|
|
|
}
|