diff --git a/pkgs/development/tools/rbspy/default.nix b/pkgs/development/tools/rbspy/default.nix index d54d52e139ef..2a7ced543ba6 100644 --- a/pkgs/development/tools/rbspy/default.nix +++ b/pkgs/development/tools/rbspy/default.nix @@ -4,8 +4,6 @@ , fetchFromGitHub , ruby , which -, runCommand -, darwin }: rustPlatform.buildRustPackage rec { @@ -20,6 +18,12 @@ rustPlatform.buildRustPackage rec { }; cargoHash = "sha256-JzspNL4T28awa/1Uajw0gLM3bYyUBYTjnfCXn9qG7SY="; + + # error: linker `aarch64-linux-gnu-gcc` not found + postPatch = '' + rm .cargo/config + ''; + doCheck = true; # The current implementation of rbspy fails to detect the version of ruby @@ -39,19 +43,10 @@ rustPlatform.buildRustPackage rec { "--skip=test_sample_subprocesses" ]; - nativeBuildInputs = [ ruby which ]; - - buildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ - # Pull a header that contains a definition of proc_pid_rusage(). - (runCommand "${pname}_headers" { } '' - install -Dm444 ${lib.getDev darwin.apple_sdk.sdk}/include/libproc.h $out/include/libproc.h - '') - ]; - - LIBCLANG_PATH = lib.optionalString stdenv.isDarwin "${stdenv.cc.cc.lib}/lib"; + nativeBuildInputs = [ ruby which ] + ++ lib.optional stdenv.isDarwin rustPlatform.bindgenHook; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); homepage = "https://rbspy.github.io/"; description = '' A Sampling CPU Profiler for Ruby. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bc0afeedec9b..c7518848ccc9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -39562,7 +39562,7 @@ with pkgs; rauc = callPackage ../tools/misc/rauc { }; - rbspy = callPackage ../development/tools/rbspy { }; + rbspy = darwin.apple_sdk_11_0.callPackage ../development/tools/rbspy { }; redprl = callPackage ../applications/science/logic/redprl { };