py-spy: make fixes more legal
This commit is contained in:
parent
ad2af572f8
commit
a3092152a2
@ -3,10 +3,7 @@
|
|||||||
, darwin
|
, darwin
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, libunwind
|
, libunwind
|
||||||
, pkg-config
|
|
||||||
, pkgsBuildBuild
|
|
||||||
, python3
|
, python3
|
||||||
, runCommand
|
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -23,6 +20,11 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoHash = "sha256-nm+44YWSJOOg9a9d8b3APXW50ThV3iA2C/QsJMttscE=";
|
cargoHash = "sha256-nm+44YWSJOOg9a9d8b3APXW50ThV3iA2C/QsJMttscE=";
|
||||||
|
|
||||||
|
# error: linker `arm-linux-gnueabihf-gcc` not found
|
||||||
|
postPatch = ''
|
||||||
|
rm .cargo/config
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
rustPlatform.bindgenHook
|
rustPlatform.bindgenHook
|
||||||
];
|
];
|
||||||
@ -33,18 +35,11 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
buildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
buildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
||||||
# Pull a header that contains a definition of proc_pid_rusage().
|
# Pull a header that contains a definition of proc_pid_rusage().
|
||||||
(runCommand "${pname}_headers" { } ''
|
darwin.apple_sdk_11_0.Libsystem
|
||||||
install -Dm444 ${lib.getDev darwin.apple_sdk.sdk}/include/libproc.h $out/include/libproc.h
|
|
||||||
'')
|
|
||||||
];
|
];
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = "-L${libunwind}/lib";
|
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 = [
|
checkFlags = [
|
||||||
# thread 'python_data_access::tests::test_copy_string' panicked at 'called `Result::unwrap()` on an `Err`
|
# thread 'python_data_access::tests::test_copy_string' panicked at 'called `Result::unwrap()` on an `Err`
|
||||||
"--skip=python_data_access::tests::test_copy_string"
|
"--skip=python_data_access::tests::test_copy_string"
|
||||||
|
@ -11844,7 +11844,7 @@ with pkgs;
|
|||||||
pythonPackages = python27Packages;
|
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;
|
pydeps = with python3Packages; toPythonApplication pydeps;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user