2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchurl, buildDunePackage, bigarray-compat, alcotest, ocaml }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "cstruct";
|
2021-10-01 09:20:50 +00:00
|
|
|
version = "6.0.1";
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
useDune2 = true;
|
|
|
|
|
|
|
|
minimumOCamlVersion = "4.03";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/mirage/ocaml-cstruct/releases/download/v${version}/cstruct-v${version}.tbz";
|
2021-10-01 09:20:50 +00:00
|
|
|
sha256 = "4a67bb8f042753453c59eabf0e47865631253ba694091ce6062aac05d47a9bed";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
propagatedBuildInputs = [ bigarray-compat ];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
# alcotest isn't available for OCaml < 4.08 due to fmt
|
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
2021-02-05 17:12:51 +00:00
|
|
|
checkInputs = [ alcotest ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Access C-like structures directly from OCaml";
|
|
|
|
license = lib.licenses.isc;
|
|
|
|
homepage = "https://github.com/mirage/ocaml-cstruct";
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
}
|