diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2020-10-25 19:54:25 +0100 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2021-02-01 16:11:29 +0100 |
commit | 6a27377958acc3f036843eced9332bee7ef46995 (patch) | |
tree | 63aca467da5963ef3442dcbd47ad99a4bf0a9525 /pkgs/development/ocaml-modules/cstruct | |
parent | 99bb24459d1f0c3a9ec6bcfdbd3ecaa8dd624f3e (diff) | |
download | nixpkgs-6a27377958acc3f036843eced9332bee7ef46995.tar nixpkgs-6a27377958acc3f036843eced9332bee7ef46995.tar.gz nixpkgs-6a27377958acc3f036843eced9332bee7ef46995.tar.bz2 nixpkgs-6a27377958acc3f036843eced9332bee7ef46995.tar.lz nixpkgs-6a27377958acc3f036843eced9332bee7ef46995.tar.xz nixpkgs-6a27377958acc3f036843eced9332bee7ef46995.tar.zst nixpkgs-6a27377958acc3f036843eced9332bee7ef46995.zip |
ocamlPackages.cstruct: 5.0.0 → 6.0.0
Diffstat (limited to 'pkgs/development/ocaml-modules/cstruct')
-rw-r--r-- | pkgs/development/ocaml-modules/cstruct/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/cstruct/lwt.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/cstruct/ppx.nix | 24 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/cstruct/sexp.nix | 7 |
4 files changed, 34 insertions, 9 deletions
diff --git a/pkgs/development/ocaml-modules/cstruct/default.nix b/pkgs/development/ocaml-modules/cstruct/default.nix index acd5d83e4f1..8b0c4ee9ebb 100644 --- a/pkgs/development/ocaml-modules/cstruct/default.nix +++ b/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; diff --git a/pkgs/development/ocaml-modules/cstruct/lwt.nix b/pkgs/development/ocaml-modules/cstruct/lwt.nix index 113df1e89b5..df8941d1260 100644 --- a/pkgs/development/ocaml-modules/cstruct/lwt.nix +++ b/pkgs/development/ocaml-modules/cstruct/lwt.nix @@ -8,7 +8,7 @@ buildDunePackage { pname = "cstruct-lwt"; inherit (cstruct) version src useDune2 meta; - minimumOCamlVersion = "4.02"; + minimumOCamlVersion = "4.03"; propagatedBuildInputs = [ cstruct lwt ]; } diff --git a/pkgs/development/ocaml-modules/cstruct/ppx.nix b/pkgs/development/ocaml-modules/cstruct/ppx.nix index 44343812090..aa003295e90 100644 --- a/pkgs/development/ocaml-modules/cstruct/ppx.nix +++ b/pkgs/development/ocaml-modules/cstruct/ppx.nix @@ -1,4 +1,7 @@ -{ lib, buildDunePackage, cstruct, sexplib, ppx_tools_versioned, ppxlib }: +{ lib, buildDunePackage, cstruct, sexplib, ppxlib, stdlib-shims +, ounit, cppo, ppx_sexp_conv, cstruct-unix, cstruct-sexp +, fetchpatch +}: if !lib.versionAtLeast (cstruct.version or "1") "3" then cstruct @@ -8,7 +11,22 @@ buildDunePackage { pname = "ppx_cstruct"; inherit (cstruct) version src useDune2 meta; - minimumOCamlVersion = "4.03"; + minimumOCamlVersion = "4.07"; - propagatedBuildInputs = [ cstruct ppx_tools_versioned ppxlib sexplib ]; + # prevent ANSI escape sequences from messing up the test cases + # https://github.com/mirage/ocaml-cstruct/issues/283 + patches = [ + (fetchpatch { + url = "https://github.com/mirage/ocaml-cstruct/pull/285/commits/60dfed98b4c34455bf339ac60e2ed5ef05feb48f.patch"; + sha256 = "1x9i62nrlfy9l44vb0a7qjfrg2wyki4c8nmmqnzwpcbkgxi3q6n5"; + }) + ]; + + propagatedBuildInputs = [ cstruct ppxlib sexplib stdlib-shims ]; + + # disable until ppx_sexp_conv uses ppxlib 0.20.0 (or >= 0.16.0) + # since the propagation of the older ppxlib breaks the ppx_cstruct + # build. + doCheck = false; + checkInputs = [ ounit cppo ppx_sexp_conv cstruct-sexp cstruct-unix ]; } diff --git a/pkgs/development/ocaml-modules/cstruct/sexp.nix b/pkgs/development/ocaml-modules/cstruct/sexp.nix index 742cb6522eb..b04810e4803 100644 --- a/pkgs/development/ocaml-modules/cstruct/sexp.nix +++ b/pkgs/development/ocaml-modules/cstruct/sexp.nix @@ -8,8 +8,11 @@ buildDunePackage rec { pname = "cstruct-sexp"; inherit (cstruct) version src useDune2 meta; - doCheck = lib.versionAtLeast ocaml.version "4.03"; - checkInputs = lib.optional doCheck alcotest; + minimumOCamlVersion = "4.03"; + + # alcotest is only available on OCaml >= 4.05 due to fmt + doCheck = lib.versionAtLeast ocaml.version "4.05"; + checkInputs = [ alcotest ]; propagatedBuildInputs = [ cstruct sexplib ]; } |