mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-05 22:06:00 +03:00
Merge pull request #214093 from wegank/py-spy-darwin
py-spy: fix build on darwin
This commit is contained in:
commit
bed6c495a0
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3 }:
|
||||
{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3, runCommand, darwin }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "py-spy";
|
||||
@ -11,6 +11,15 @@ rustPlatform.buildRustPackage rec {
|
||||
sha256 = "sha256-NciyzKiDKIMeuHhTjzmHIc3dYW4AniuCNjZugm4hMss=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ rustPlatform.bindgenHook ];
|
||||
|
||||
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
|
||||
'')
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-L${libunwind}/lib";
|
||||
|
||||
# error: linker `arm-linux-gnueabihf-gcc` not found
|
||||
|
Loading…
Reference in New Issue
Block a user