diff --git a/pkgs/development/tools/py-spy/default.nix b/pkgs/development/tools/py-spy/default.nix index 86aceace84e1..3b907c201089 100644 --- a/pkgs/development/tools/py-spy/default.nix +++ b/pkgs/development/tools/py-spy/default.nix @@ -3,10 +3,7 @@ , darwin , fetchFromGitHub , libunwind -, pkg-config -, pkgsBuildBuild , python3 -, runCommand , rustPlatform }: @@ -23,6 +20,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-nm+44YWSJOOg9a9d8b3APXW50ThV3iA2C/QsJMttscE="; + # error: linker `arm-linux-gnueabihf-gcc` not found + postPatch = '' + rm .cargo/config + ''; + nativeBuildInputs = [ rustPlatform.bindgenHook ]; @@ -33,18 +35,11 @@ rustPlatform.buildRustPackage rec { 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 - '') + darwin.apple_sdk_11_0.Libsystem ]; env.NIX_CFLAGS_COMPILE = "-L${libunwind}/lib"; - # error: linker `arm-linux-gnueabihf-gcc` not found - preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - export RUSTFLAGS="-Clinker=$CC" - ''; - checkFlags = [ # thread 'python_data_access::tests::test_copy_string' panicked at 'called `Result::unwrap()` on an `Err` "--skip=python_data_access::tests::test_copy_string" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75f7c262c4da..4ae9a28fcd8e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11844,7 +11844,7 @@ with pkgs; pythonPackages = python27Packages; }; - py-spy = callPackage ../development/tools/py-spy { }; + py-spy = darwin.apple_sdk_11_0.callPackage ../development/tools/py-spy { }; pydeps = with python3Packages; toPythonApplication pydeps;