1{ lib, fetchFromGitHub, buildDunePackage, ocaml }:
2
3buildDunePackage rec {
4 pname = "bigstring";
5 version = "0.3";
6
7 duneVersion = "3";
8 minimalOCamlVersion = "4.03";
9
10 # Ensure compatibility with OCaml ≥ 5.0
11 preConfigure = lib.optional (lib.versionAtLeast ocaml.version "4.08") ''
12 substituteInPlace src/dune --replace '(libraries bytes bigarray)' ""
13 '';
14
15 src = fetchFromGitHub {
16 owner = "c-cube";
17 repo = "ocaml-bigstring";
18 rev = version;
19 sha256 = "0bkxwdcswy80f6rmx5wjza92xzq4rdqsb4a9fm8aav8bdqx021n8";
20 };
21
22 # Circular dependency with bigstring-unix
23 doCheck = false;
24
25 meta = with lib; {
26 homepage = "https://github.com/c-cube/ocaml-bigstring";
27 description = "Bigstring built on top of bigarrays, and convenient functions";
28 license = licenses.bsd2;
29 maintainers = [ maintainers.alexfmpe ];
30 };
31}