lol
at 23.05-pre 30 lines 830 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.12"; 6 7 src = fetchFromGitHub { 8 owner = "benfred"; 9 repo = "py-spy"; 10 rev = "v${version}"; 11 sha256 = "sha256-k58PPJAF9MsKRlscFSqdtTY5/rriaF0mXjgkADT+F4s="; 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-DC+EfJ671/bvFoHHjpJlFCO/phdndNcldnP3DsIKqAg="; 24 25 meta = with lib; { 26 description = "Sampling profiler for Python programs"; 27 license = licenses.mit; 28 maintainers = [ maintainers.lnl7 ]; 29 }; 30}