2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3 }:
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "py-spy";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.3.12";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "benfred";
|
|
|
|
repo = "py-spy";
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-k58PPJAF9MsKRlscFSqdtTY5/rriaF0mXjgkADT+F4s=";
|
2020-12-25 13:55:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-L${libunwind}/lib";
|
|
|
|
|
|
|
|
# error: linker `arm-linux-gnueabihf-gcc` not found
|
2021-02-05 17:12:51 +00:00
|
|
|
preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
2020-12-25 13:55:36 +00:00
|
|
|
export RUSTFLAGS="-Clinker=$CC"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ python3 ];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
cargoSha256 = "sha256-DC+EfJ671/bvFoHHjpJlFCO/phdndNcldnP3DsIKqAg=";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-25 13:55:36 +00:00
|
|
|
description = "Sampling profiler for Python programs";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.lnl7 ];
|
|
|
|
};
|
|
|
|
}
|