2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3 }:
|
2020-11-23 11:24:00 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "py-spy";
|
2021-03-24 20:03:04 +00:00
|
|
|
version = "0.3.5";
|
2020-11-23 11:24:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "benfred";
|
|
|
|
repo = "py-spy";
|
|
|
|
rev = "v${version}";
|
2021-03-24 20:03:04 +00:00
|
|
|
sha256 = "sha256-O6DbY/0ZI+BeG22jd9snbE718Y2vv7fqmeDdGWTnqfY=";
|
2020-11-23 11:24:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-L${libunwind}/lib";
|
|
|
|
|
|
|
|
# error: linker `arm-linux-gnueabihf-gcc` not found
|
2021-01-23 12:26:19 +00:00
|
|
|
preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
2020-11-23 11:24:00 +00:00
|
|
|
export RUSTFLAGS="-Clinker=$CC"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ python3 ];
|
|
|
|
|
2021-03-24 20:03:04 +00:00
|
|
|
cargoSha256 = "sha256-GFH8RzyAMtdfoHPcCV3pKf24fKU65vhMLQfLtkhD0Ns=";
|
2020-11-23 11:24:00 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-11-23 11:24:00 +00:00
|
|
|
description = "Sampling profiler for Python programs";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.lnl7 ];
|
|
|
|
};
|
|
|
|
}
|