diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/py-spy/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/py-spy/default.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/py-spy/default.nix b/nixpkgs/pkgs/development/tools/py-spy/default.nix new file mode 100644 index 000000000000..5e1dcbfa6fce --- /dev/null +++ b/nixpkgs/pkgs/development/tools/py-spy/default.nix @@ -0,0 +1,30 @@ +{ stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkgconfig, libunwind, python3 }: + +rustPlatform.buildRustPackage rec { + pname = "py-spy"; + version = "0.3.3"; + + src = fetchFromGitHub { + owner = "benfred"; + repo = "py-spy"; + rev = "v${version}"; + sha256 = "1w9nwsmazafr78ghif6njdcqjisr0f1jb6cm1w4ngvigx5qlrbkv"; + }; + + NIX_CFLAGS_COMPILE = "-L${libunwind}/lib"; + + # error: linker `arm-linux-gnueabihf-gcc` not found + preConfigure = stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + export RUSTFLAGS="-Clinker=$CC" + ''; + + checkInputs = [ python3 ]; + + cargoSha256 = "0hrzmpwd2k4l8gjbry8ddrkv9q9qh8ag096md4q0fyn5bgnxhkah"; + + meta = with stdenv.lib; { + description = "Sampling profiler for Python programs"; + license = licenses.mit; + maintainers = [ maintainers.lnl7 ]; + }; +} |