1{
2 stdenv,
3 fetchurl,
4 ocaml,
5 findlib,
6 ocamlbuild,
7 opaline,
8 withShared ? true,
9 lib,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "ocaml${ocaml.version}-uchar";
14 version = "0.0.2";
15
16 src = fetchurl {
17 url = "https://github.com/ocaml/uchar/releases/download/v${version}/uchar-${version}.tbz";
18 sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7";
19 };
20
21 nativeBuildInputs = [
22 ocaml
23 ocamlbuild
24 findlib
25 ];
26
27 strictDeps = true;
28
29 buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${lib.boolToString withShared}";
30 installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR";
31 configurePlatforms = [ ];
32
33 meta = {
34 description = "Compatibility library for OCaml’s Uchar module";
35 inherit (ocaml.meta) platforms license;
36 maintainers = [ lib.maintainers.vbgl ];
37 };
38}