ocamlPackages.mirage-crypto-rng: fix tests on x86_64-darwin (#521056)

This commit is contained in:
yaya
2026-05-27 09:30:04 +00:00
committed by GitHub
@@ -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