py-spy: equalize

This commit is contained in:
Fabian Affolter 2023-03-13 20:57:27 +01:00
parent e2bd18f5e5
commit 64f561b4f5

View File

@ -1,4 +1,14 @@
{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3, runCommand, darwin }:
{ lib
, stdenv
, darwin
, fetchFromGitHub
, libunwind
, pkg-config
, pkgsBuildBuild
, python3
, runCommand
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
pname = "py-spy";
@ -7,11 +17,19 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "benfred";
repo = "py-spy";
rev = "v${version}";
sha256 = "sha256-NciyzKiDKIMeuHhTjzmHIc3dYW4AniuCNjZugm4hMss=";
rev = "refs/tags/v${version}";
hash = "sha256-NciyzKiDKIMeuHhTjzmHIc3dYW4AniuCNjZugm4hMss=";
};
nativeBuildInputs = [ rustPlatform.bindgenHook ];
cargoHash = "sha256-nm+44YWSJOOg9a9d8b3APXW50ThV3iA2C/QsJMttscE=";
nativeBuildInputs = [
rustPlatform.bindgenHook
];
nativeCheckInputs = [
python3
];
buildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
# Pull a header that contains a definition of proc_pid_rusage().
@ -27,13 +45,9 @@ rustPlatform.buildRustPackage rec {
export RUSTFLAGS="-Clinker=$CC"
'';
nativeCheckInputs = [ python3 ];
cargoSha256 = "sha256-nm+44YWSJOOg9a9d8b3APXW50ThV3iA2C/QsJMttscE=";
meta = with lib; {
description = "Sampling profiler for Python programs";
license = licenses.mit;
maintainers = [ maintainers.lnl7 ];
maintainers = with maintainers; [ lnl7 ];
};
}