depot/third_party/nixpkgs/pkgs/development/tools/py-spy/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

30 lines
836 B
Nix

{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3 }:
rustPlatform.buildRustPackage rec {
pname = "py-spy";
version = "0.3.14";
src = fetchFromGitHub {
owner = "benfred";
repo = "py-spy";
rev = "v${version}";
sha256 = "sha256-NciyzKiDKIMeuHhTjzmHIc3dYW4AniuCNjZugm4hMss=";
};
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"
'';
nativeCheckInputs = [ python3 ];
cargoSha256 = "sha256-nm+44YWSJOOg9a9d8b3APXW50ThV3iA2C/QsJMttscE=";
meta = with lib; {
description = "Sampling profiler for Python programs";
license = licenses.mit;
maintainers = [ maintainers.lnl7 ];
};
}