ocamlPackages.mirage-crypto-rng: fix tests on x86_64-darwin

This commit is contained in:
Angel J
2026-05-16 12:08:45 -07:00
parent 3f50e4bb0b
commit 1bcf9b24d8
@@ -1,4 +1,6 @@
{
lib,
stdenv,
buildDunePackage,
mirage-crypto,
ohex,
@@ -24,6 +26,14 @@ buildDunePackage {
randomconv
];
# test_entropy relies on timer jitter and is flaky on x86_64-darwin.
postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
substituteInPlace tests/dune \
--replace-fail \
'(enabled_if (and (<> %{architecture} "arm64") (<> %{architecture} "riscv")))' \
'(enabled_if false)'
'';
buildInputs = [ dune-configurator ];
propagatedBuildInputs = [
digestif