From 1bcf9b24d8b601c4feafb4ef5e8d2dab34cb85f3 Mon Sep 17 00:00:00 2001 From: Angel J <78835633+Iamanaws@users.noreply.github.com> Date: Sat, 16 May 2026 12:08:45 -0700 Subject: [PATCH] ocamlPackages.mirage-crypto-rng: fix tests on x86_64-darwin --- pkgs/development/ocaml-modules/mirage-crypto/rng.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) 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