diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-02-24 04:20:00 +0000 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2023-02-24 04:20:00 +0000 |
commit | 4c6a35989ac740abb29c9a2639dd6a8f00071a0e (patch) | |
tree | 710211462ff0e85b728e38c5ae57b431f1884a25 | |
parent | 45e9ca62cfd9272cdbd983b9b4098ca4e737b363 (diff) | |
download | nixpkgs-4c6a35989ac740abb29c9a2639dd6a8f00071a0e.tar nixpkgs-4c6a35989ac740abb29c9a2639dd6a8f00071a0e.tar.gz nixpkgs-4c6a35989ac740abb29c9a2639dd6a8f00071a0e.tar.bz2 nixpkgs-4c6a35989ac740abb29c9a2639dd6a8f00071a0e.tar.lz nixpkgs-4c6a35989ac740abb29c9a2639dd6a8f00071a0e.tar.xz nixpkgs-4c6a35989ac740abb29c9a2639dd6a8f00071a0e.tar.zst nixpkgs-4c6a35989ac740abb29c9a2639dd6a8f00071a0e.zip |
rbspy: fix build on darwin
-rw-r--r-- | pkgs/development/tools/rbspy/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/tools/rbspy/default.nix b/pkgs/development/tools/rbspy/default.nix index 018d8d3310f..0e66f21a5cc 100644 --- a/pkgs/development/tools/rbspy/default.nix +++ b/pkgs/development/tools/rbspy/default.nix @@ -4,6 +4,8 @@ , fetchFromGitHub , ruby , which +, runCommand +, darwin }: rustPlatform.buildRustPackage rec { @@ -39,6 +41,15 @@ rustPlatform.buildRustPackage rec { 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"; + meta = with lib; { broken = (stdenv.isLinux && stdenv.isAarch64); homepage = "https://rbspy.github.io/"; |