1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/py-spy/default.nix

31 lines
829 B
Nix
Raw Normal View History

{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3 }:
2020-11-23 11:24:00 +00:00
rustPlatform.buildRustPackage rec {
pname = "py-spy";
2021-01-20 20:34:42 +00:00
version = "0.3.4";
2020-11-23 11:24:00 +00:00
src = fetchFromGitHub {
owner = "benfred";
repo = "py-spy";
rev = "v${version}";
2021-01-20 20:34:42 +00:00
sha256 = "sha256-7282DGLNHpKorNTHvpMLmqF2DrEVMIiQIzf5nTuJ7lc=";
2020-11-23 11:24:00 +00:00
};
NIX_CFLAGS_COMPILE = "-L${libunwind}/lib";
# error: linker `arm-linux-gnueabihf-gcc` not found
preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
2020-11-23 11:24:00 +00:00
export RUSTFLAGS="-Clinker=$CC"
'';
checkInputs = [ python3 ];
2021-01-20 20:34:42 +00:00
cargoSha256 = "sha256-qVnOuLNMAy+6MP+dh6vLiSXvwQBAwyzRnHzCP60BdWk=";
2020-11-23 11:24:00 +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 ];
};
}