mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 05:33:23 +00:00
31 lines
830 B
Nix
31 lines
830 B
Nix
{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3 }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "py-spy";
|
|
version = "0.3.11";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "benfred";
|
|
repo = "py-spy";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-4Zp4IGd4lKBC0ye2/7Tfpz8vJzm0VnkKqx/2k3mCj3A=";
|
|
};
|
|
|
|
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-LEtmzCoT8esBYh9PkCGpzUU7miaWd3Ao0z/LzxhP39A=";
|
|
|
|
meta = with lib; {
|
|
description = "Sampling profiler for Python programs";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.lnl7 ];
|
|
};
|
|
}
|