From de8b2a67725159b32eac31ff6f82fbe2b80ab601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Fri, 3 Jan 2025 16:15:37 +1100 Subject: [PATCH] rbspy: fix tests in macos sandbox --- pkgs/development/tools/rbspy/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/rbspy/default.nix b/pkgs/development/tools/rbspy/default.nix index 663b73e06456..4a61021a00ca 100644 --- a/pkgs/development/tools/rbspy/default.nix +++ b/pkgs/development/tools/rbspy/default.nix @@ -35,6 +35,8 @@ rustPlatform.buildRustPackage rec { --replace /usr/bin/which '${which}/bin/which' substituteInPlace src/sampler/mod.rs \ --replace /usr/bin/which '${which}/bin/which' + substituteInPlace src/core/ruby_spy.rs \ + --replace /usr/bin/ruby '${ruby}/bin/ruby' ''; checkFlags = [ @@ -45,10 +47,12 @@ rustPlatform.buildRustPackage rec { "--skip=test_sample_subprocesses" ]; - nativeBuildInputs = [ + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin rustPlatform.bindgenHook; + + nativeCheckInputs = [ ruby which - ] ++ lib.optional stdenv.hostPlatform.isDarwin rustPlatform.bindgenHook; + ]; passthru.updateScript = nix-update-script { };