nixpkgs/pkgs/development/ocaml-modules/uchar/default.nix
Vincent Laporte 92ef4067a6 ocamlPackages.uchar: init at 0.0.1
The uchar package provides a compatibility library for the `Uchar` module introduced in OCaml 4.03.
2016-10-19 19:20:32 +02:00

28 lines
856 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ 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 ];
};
}