3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix

29 lines
811 B
Nix
Raw Normal View History

2020-10-25 18:54:25 +00:00
{ lib, fetchurl, buildDunePackage, bigarray-compat, alcotest, ocaml }:
buildDunePackage rec {
pname = "cstruct";
version = "6.0.1";
2020-11-19 06:36:41 +00:00
useDune2 = true;
minimumOCamlVersion = "4.03";
2017-11-28 01:11:15 +00:00
src = fetchurl {
url = "https://github.com/mirage/ocaml-cstruct/releases/download/v${version}/cstruct-v${version}.tbz";
sha256 = "4a67bb8f042753453c59eabf0e47865631253ba694091ce6062aac05d47a9bed";
2017-11-28 01:11:15 +00:00
};
2020-11-19 06:36:41 +00:00
propagatedBuildInputs = [ bigarray-compat ];
2020-10-25 18:54:25 +00:00
# alcotest isn't available for OCaml < 4.05 due to fmt
doCheck = lib.versionAtLeast ocaml.version "4.05";
checkInputs = [ alcotest ];
2017-11-28 01:11:15 +00:00
meta = {
description = "Access C-like structures directly from OCaml";
license = lib.licenses.isc;
2017-11-28 01:11:15 +00:00
homepage = "https://github.com/mirage/ocaml-cstruct";
maintainers = [ lib.maintainers.vbgl ];
2017-11-28 01:11:15 +00:00
};
}