2020-10-13 23:46:17 +00:00
|
|
|
|
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true, lib }:
|
2016-10-19 17:20:32 +00:00
|
|
|
|
|
2021-11-09 19:42:54 +00:00
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "ocaml${ocaml.version}-uchar";
|
|
|
|
|
version = "0.0.2";
|
2016-10-19 17:20:32 +00:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-09 19:42:54 +00:00
|
|
|
|
url = "https://github.com/ocaml/uchar/releases/download/v${version}/uchar-${version}.tbz";
|
2018-03-31 06:52:55 +00:00
|
|
|
|
sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7";
|
2016-10-19 17:20:32 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-01-12 07:25:50 +00:00
|
|
|
|
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
|
2022-02-22 09:59:04 +00:00
|
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
2020-10-13 23:46:17 +00:00
|
|
|
|
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${lib.boolToString withShared}";
|
2020-01-12 07:25:50 +00:00
|
|
|
|
installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR";
|
2021-11-09 19:53:19 +00:00
|
|
|
|
configurePlatforms = [ ];
|
2016-10-19 17:20:32 +00:00
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
description = "Compatibility library for OCaml’s Uchar module";
|
|
|
|
|
inherit (ocaml.meta) platforms license;
|
2021-01-11 12:49:15 +00:00
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2016-10-19 17:20:32 +00:00
|
|
|
|
};
|
|
|
|
|
}
|