02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
30 lines
830 B
Nix
30 lines
830 B
Nix
{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3 }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "py-spy";
|
|
version = "0.3.12";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "benfred";
|
|
repo = "py-spy";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-k58PPJAF9MsKRlscFSqdtTY5/rriaF0mXjgkADT+F4s=";
|
|
};
|
|
|
|
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"
|
|
'';
|
|
|
|
checkInputs = [ python3 ];
|
|
|
|
cargoSha256 = "sha256-DC+EfJ671/bvFoHHjpJlFCO/phdndNcldnP3DsIKqAg=";
|
|
|
|
meta = with lib; {
|
|
description = "Sampling profiler for Python programs";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.lnl7 ];
|
|
};
|
|
}
|