ocamlPackages.uchar: init at 0.0.1

The uchar package provides a compatibility library for the `Uchar` module introduced in OCaml 4.03.
This commit is contained in:
Vincent Laporte 2016-10-19 19:20:32 +02:00
parent db68972206
commit 92ef4067a6
2 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,27 @@
{ stdenv, fetchurl, ocaml, ocamlbuild, opam }:
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-uchar-0.0.1";
src = fetchurl {
url = https://github.com/ocaml/uchar/releases/download/v0.0.1/uchar-0.0.1.tbz;
sha256 = "0ficw1x7ymbd6m8hqw3w1aycwm1hbwd6bad3c5pspwnzh3qlikhi";
};
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml ocamlbuild opam ];
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
installPhase = ''
opam-installer --script --prefix=$out uchar.install > install.sh
sh install.sh
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/
ln -s $out/lib/uchar $out/lib/ocaml/${ocaml.version}/site-lib/
'';
meta = {
description = "Compatibility library for OCamls Uchar module";
inherit (ocaml.meta) platforms license;
maintainers = [ stdenv.lib.maintainers.vbgl ];
};
}

View file

@ -441,6 +441,8 @@ let
typerep_p4 = callPackage ../development/ocaml-modules/typerep { };
uchar = callPackage ../development/ocaml-modules/uchar { };
utop = callPackage ../development/tools/ocaml/utop { };
uuidm = callPackage ../development/ocaml-modules/uuidm { };