2016-11-03 02:02:16 +00:00
|
|
|
{ stdenv, buildOcaml, fetchurl, ocaml, findlib, ocamlbuild, opam, cmdliner}:
|
2014-07-09 08:42:26 +01:00
|
|
|
let
|
|
|
|
pname = "uutf";
|
|
|
|
webpage = "http://erratique.ch/software/${pname}";
|
|
|
|
in
|
2014-09-21 11:02:55 +01:00
|
|
|
|
2016-11-03 02:02:16 +00:00
|
|
|
buildOcaml rec {
|
|
|
|
name = pname;
|
|
|
|
version = "0.9.4";
|
2014-09-21 11:02:55 +01:00
|
|
|
|
2016-11-03 02:02:16 +00:00
|
|
|
minimumSupportedOcamlVersion = "4.00.0";
|
2014-07-09 08:42:26 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${webpage}/releases/${pname}-${version}.tbz";
|
2016-11-03 02:02:16 +00:00
|
|
|
sha256 = "1f71fyawxal42x6g82539bv0ava2smlar6rmxxz1cyq3l0i6fw0k";
|
2014-07-09 08:42:26 +01:00
|
|
|
};
|
|
|
|
|
2016-11-03 02:02:16 +00:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild opam cmdliner ];
|
2014-07-09 08:42:26 +01:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
unpackCmd = "tar xjf $src";
|
|
|
|
|
2016-11-03 02:02:16 +00:00
|
|
|
buildPhase = ''
|
|
|
|
ocaml pkg/build.ml \
|
|
|
|
native=true \
|
|
|
|
native-dynlink=true \
|
|
|
|
cmdliner=true
|
|
|
|
'';
|
2014-07-09 08:42:26 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2016-11-03 02:02:16 +00:00
|
|
|
opam-installer --prefix=$out --script ${pname}.install | sh
|
|
|
|
ln -s $out/lib/uutf $out/lib/ocaml/${ocaml.version}/site-lib/
|
2014-07-09 08:42:26 +01:00
|
|
|
'';
|
|
|
|
|
2014-09-21 11:02:55 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-07-09 08:42:26 +01:00
|
|
|
description = "Non-blocking streaming Unicode codec for OCaml";
|
|
|
|
homepage = "${webpage}";
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-09-21 11:02:55 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2014-07-09 08:42:26 +01:00
|
|
|
};
|
|
|
|
}
|