summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/uchar/default.nix
blob: 8fddf883da5ddfd1fd25f2ef176484ec737e899b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline }:

stdenv.mkDerivation {
  name = "ocaml${ocaml.version}-uchar-0.0.2";

  src = fetchurl {
    url = https://github.com/ocaml/uchar/releases/download/v0.0.2/uchar-0.0.2.tbz;
    sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7";
  };

  unpackCmd = "tar xjf $src";
  buildInputs = [ ocaml ocamlbuild findlib opaline ];
  buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
  installPhase = "opaline -libdir $OCAMLFIND_DESTDIR";

  meta = {
    description = "Compatibility library for OCaml’s Uchar module";
    inherit (ocaml.meta) platforms license;
    maintainers = [ stdenv.lib.maintainers.vbgl ];
  };
}