1 { lib, buildDunePackage, fetchFromGitHub, ocaml, cppo }:
5 pname = "ocplib-endian";
7 src = fetchFromGitHub {
9 repo = "ocplib-endian";
11 sha256 = "sha256-THTlhOfXAPaqTt1qBkht+D67bw6M175QLvXoUMgjks4=";
14 postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "5.0") ''
15 substituteInPlace src/dune \
16 --replace "(libraries bytes)" "" \
17 --replace "libraries ocplib_endian bigarray bytes" "libraries ocplib_endian"
20 minimalOCamlVersion = "4.03";
22 nativeBuildInputs = [ cppo ];
25 description = "Optimised functions to read and write int16/32/64";
26 homepage = "https://github.com/OCamlPro/ocplib-endian";
27 license = licenses.lgpl21;
28 maintainers = with maintainers; [ vbgl ];