nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 21.11 28 lines 811 B view raw
1{ lib, fetchurl, buildDunePackage, bigarray-compat, alcotest, ocaml }: 2 3buildDunePackage rec { 4 pname = "cstruct"; 5 version = "6.0.1"; 6 7 useDune2 = true; 8 9 minimumOCamlVersion = "4.03"; 10 11 src = fetchurl { 12 url = "https://github.com/mirage/ocaml-cstruct/releases/download/v${version}/cstruct-v${version}.tbz"; 13 sha256 = "4a67bb8f042753453c59eabf0e47865631253ba694091ce6062aac05d47a9bed"; 14 }; 15 16 propagatedBuildInputs = [ bigarray-compat ]; 17 18 # alcotest isn't available for OCaml < 4.05 due to fmt 19 doCheck = lib.versionAtLeast ocaml.version "4.05"; 20 checkInputs = [ alcotest ]; 21 22 meta = { 23 description = "Access C-like structures directly from OCaml"; 24 license = lib.licenses.isc; 25 homepage = "https://github.com/mirage/ocaml-cstruct"; 26 maintainers = [ lib.maintainers.vbgl ]; 27 }; 28}