nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 21.05 30 lines 829 B view raw
1{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3 }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "py-spy"; 5 version = "0.3.5"; 6 7 src = fetchFromGitHub { 8 owner = "benfred"; 9 repo = "py-spy"; 10 rev = "v${version}"; 11 sha256 = "sha256-O6DbY/0ZI+BeG22jd9snbE718Y2vv7fqmeDdGWTnqfY="; 12 }; 13 14 NIX_CFLAGS_COMPILE = "-L${libunwind}/lib"; 15 16 # error: linker `arm-linux-gnueabihf-gcc` not found 17 preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' 18 export RUSTFLAGS="-Clinker=$CC" 19 ''; 20 21 checkInputs = [ python3 ]; 22 23 cargoSha256 = "sha256-hmqrVGNu3zb109TQfhLI3wvGVnlc4CfbkrIKMfRSn7M="; 24 25 meta = with lib; { 26 description = "Sampling profiler for Python programs"; 27 license = licenses.mit; 28 maintainers = [ maintainers.lnl7 ]; 29 }; 30}