2020-10-25 11:54:25 -07:00
|
|
|
{ lib, fetchurl, buildDunePackage, bigarray-compat, alcotest, ocaml }:
|
2015-02-21 23:17:52 -08:00
|
|
|
|
2018-11-05 02:21:46 -08:00
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "cstruct";
|
2020-10-25 11:54:25 -07:00
|
|
|
version = "6.0.0";
|
2020-11-18 22:36:41 -08:00
|
|
|
|
|
|
|
useDune2 = true;
|
|
|
|
|
|
|
|
minimumOCamlVersion = "4.03";
|
2018-11-05 02:21:46 -08:00
|
|
|
|
2017-11-27 17:11:15 -08:00
|
|
|
src = fetchurl {
|
2019-08-24 00:02:26 -07:00
|
|
|
url = "https://github.com/mirage/ocaml-cstruct/releases/download/v${version}/cstruct-v${version}.tbz";
|
2020-10-25 11:54:25 -07:00
|
|
|
sha256 = "0xi6cj85z033fqrqdkwac6gg07629vzdhx03c3lhiwwc4lpnv8bq";
|
2017-11-27 17:11:15 -08:00
|
|
|
};
|
2016-11-12 01:17:30 -08:00
|
|
|
|
2020-11-18 22:36:41 -08:00
|
|
|
propagatedBuildInputs = [ bigarray-compat ];
|
|
|
|
|
2020-10-25 11:54:25 -07:00
|
|
|
# alcotest isn't available for OCaml < 4.05 due to fmt
|
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.05";
|
|
|
|
checkInputs = [ alcotest ];
|
|
|
|
|
2017-11-27 17:11:15 -08:00
|
|
|
meta = {
|
|
|
|
description = "Access C-like structures directly from OCaml";
|
2019-08-24 00:02:26 -07:00
|
|
|
license = lib.licenses.isc;
|
2017-11-27 17:11:15 -08:00
|
|
|
homepage = "https://github.com/mirage/ocaml-cstruct";
|
2019-08-24 00:02:26 -07:00
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2017-11-27 17:11:15 -08:00
|
|
|
};
|
2015-02-21 23:17:52 -08:00
|
|
|
}
|