2023-03-22 05:12:11 +00:00
|
|
|
{ lib, fetchFromGitHub, buildDunePackage, ocaml }:
|
2019-12-02 05:07:43 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "bigstring";
|
2021-03-31 18:47:55 +00:00
|
|
|
version = "0.3";
|
|
|
|
|
2023-03-22 05:12:11 +00:00
|
|
|
duneVersion = "3";
|
|
|
|
minimalOCamlVersion = "4.03";
|
2019-12-02 05:07:43 +00:00
|
|
|
|
2023-03-22 05:12:11 +00:00
|
|
|
# Ensure compatibility with OCaml ≥ 5.0
|
|
|
|
preConfigure = lib.optional (lib.versionAtLeast ocaml.version "4.08") ''
|
|
|
|
substituteInPlace src/dune --replace '(libraries bytes bigarray)' ""
|
|
|
|
'';
|
2019-12-02 05:07:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "c-cube";
|
|
|
|
repo = "ocaml-bigstring";
|
|
|
|
rev = version;
|
2021-03-31 18:47:55 +00:00
|
|
|
sha256 = "0bkxwdcswy80f6rmx5wjza92xzq4rdqsb4a9fm8aav8bdqx021n8";
|
2019-12-02 05:07:43 +00:00
|
|
|
};
|
|
|
|
|
2021-03-31 18:47:55 +00:00
|
|
|
# Circular dependency with bigstring-unix
|
|
|
|
doCheck = false;
|
2019-12-02 05:07:43 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-05-08 13:20:47 +00:00
|
|
|
homepage = "https://github.com/c-cube/ocaml-bigstring";
|
2019-12-02 05:07:43 +00:00
|
|
|
description = "Bigstring built on top of bigarrays, and convenient functions";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.alexfmpe ];
|
|
|
|
};
|
|
|
|
}
|