tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
py-spy: make fixes more legal
Weijia Wang
2 years ago
a3092152
ad2af572
+7
-12
2 changed files
expand all
collapse all
unified
split
pkgs
development
tools
py-spy
default.nix
top-level
all-packages.nix
+6
-11
pkgs/development/tools/py-spy/default.nix
···
3
, darwin
4
, fetchFromGitHub
5
, libunwind
6
-
, pkg-config
7
-
, pkgsBuildBuild
8
, python3
9
-
, runCommand
10
, rustPlatform
11
}:
12
···
23
24
cargoHash = "sha256-nm+44YWSJOOg9a9d8b3APXW50ThV3iA2C/QsJMttscE=";
25
0
0
0
0
0
26
nativeBuildInputs = [
27
rustPlatform.bindgenHook
28
];
···
33
34
buildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
35
# Pull a header that contains a definition of proc_pid_rusage().
36
-
(runCommand "${pname}_headers" { } ''
37
-
install -Dm444 ${lib.getDev darwin.apple_sdk.sdk}/include/libproc.h $out/include/libproc.h
38
-
'')
39
];
40
41
env.NIX_CFLAGS_COMPILE = "-L${libunwind}/lib";
42
-
43
-
# error: linker `arm-linux-gnueabihf-gcc` not found
44
-
preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
45
-
export RUSTFLAGS="-Clinker=$CC"
46
-
'';
47
48
checkFlags = [
49
# thread 'python_data_access::tests::test_copy_string' panicked at 'called `Result::unwrap()` on an `Err`
···
3
, darwin
4
, fetchFromGitHub
5
, libunwind
0
0
6
, python3
0
7
, rustPlatform
8
}:
9
···
20
21
cargoHash = "sha256-nm+44YWSJOOg9a9d8b3APXW50ThV3iA2C/QsJMttscE=";
22
23
+
# error: linker `arm-linux-gnueabihf-gcc` not found
24
+
postPatch = ''
25
+
rm .cargo/config
26
+
'';
27
+
28
nativeBuildInputs = [
29
rustPlatform.bindgenHook
30
];
···
35
36
buildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
37
# Pull a header that contains a definition of proc_pid_rusage().
38
+
darwin.apple_sdk_11_0.Libsystem
0
0
39
];
40
41
env.NIX_CFLAGS_COMPILE = "-L${libunwind}/lib";
0
0
0
0
0
42
43
checkFlags = [
44
# thread 'python_data_access::tests::test_copy_string' panicked at 'called `Result::unwrap()` on an `Err`
+1
-1
pkgs/top-level/all-packages.nix
···
11844
pythonPackages = python27Packages;
11845
};
11846
11847
-
py-spy = callPackage ../development/tools/py-spy { };
11848
11849
pydeps = with python3Packages; toPythonApplication pydeps;
11850
···
11844
pythonPackages = python27Packages;
11845
};
11846
11847
+
py-spy = darwin.apple_sdk_11_0.callPackage ../development/tools/py-spy { };
11848
11849
pydeps = with python3Packages; toPythonApplication pydeps;
11850