about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix b/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix
index acd5d83e4f1e..8b0c4ee9ebbc 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix
@@ -1,8 +1,8 @@
-{ lib, fetchurl, buildDunePackage, bigarray-compat }:
+{ lib, fetchurl, buildDunePackage, bigarray-compat, alcotest, ocaml }:
 
 buildDunePackage rec {
   pname = "cstruct";
-  version = "5.0.0";
+  version = "6.0.0";
 
   useDune2 = true;
 
@@ -10,11 +10,15 @@ buildDunePackage rec {
 
   src = fetchurl {
     url = "https://github.com/mirage/ocaml-cstruct/releases/download/v${version}/cstruct-v${version}.tbz";
-    sha256 = "1z403q2nkgz5x07j0ypy6q0mk2yxgqbp1jlqkngbajna7124x2pb";
+    sha256 = "0xi6cj85z033fqrqdkwac6gg07629vzdhx03c3lhiwwc4lpnv8bq";
   };
 
   propagatedBuildInputs = [ bigarray-compat ];
 
+  # alcotest isn't available for OCaml < 4.05 due to fmt
+  doCheck = lib.versionAtLeast ocaml.version "4.05";
+  checkInputs = [ alcotest ];
+
   meta = {
     description = "Access C-like structures directly from OCaml";
     license = lib.licenses.isc;