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