2020-10-27 00:29:36 +00:00
|
|
|
|
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true, lib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "ocaml${ocaml.version}-uchar";
|
|
|
|
|
version = "0.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
|
url = "https://github.com/ocaml/uchar/releases/download/v${version}/uchar-${version}.tbz";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
|
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${lib.boolToString withShared}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
configurePlatforms = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
description = "Compatibility library for OCaml’s Uchar module";
|
|
|
|
|
inherit (ocaml.meta) platforms license;
|
2021-01-15 22:18:51 +00:00
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|