diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng.nix index e8a22ce06571..4c80fa46ca38 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/rng.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/rng.nix @@ -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