2019-11-20 11:31:23 +00:00
|
|
|
|
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true }:
|
2016-10-19 18:20:32 +01:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2018-03-31 07:52:55 +01:00
|
|
|
|
name = "ocaml${ocaml.version}-uchar-0.0.2";
|
2016-10-19 18:20:32 +01:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
|
url = "https://github.com/ocaml/uchar/releases/download/v0.0.2/uchar-0.0.2.tbz";
|
2018-03-31 07:52:55 +01:00
|
|
|
|
sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7";
|
2016-10-19 18:20:32 +01:00
|
|
|
|
};
|
|
|
|
|
|
2020-01-12 07:25:50 +00:00
|
|
|
|
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
|
|
|
|
|
buildInputs = [ findlib ocaml ocamlbuild ];
|
2019-11-20 11:31:23 +00:00
|
|
|
|
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${if withShared then "true" else "false"}";
|
2020-01-12 07:25:50 +00:00
|
|
|
|
installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR";
|
2019-10-31 10:16:15 +00:00
|
|
|
|
configurePlatforms = [];
|
2016-10-19 18:20:32 +01:00
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
description = "Compatibility library for OCaml’s Uchar module";
|
|
|
|
|
inherit (ocaml.meta) platforms license;
|
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
|
};
|
|
|
|
|
}
|