diff --git a/pkgs/development/tools/py-spy/default.nix b/pkgs/development/tools/py-spy/default.nix index 1fb54f8c17ed..c623a2e086fe 100644 --- a/pkgs/development/tools/py-spy/default.nix +++ b/pkgs/development/tools/py-spy/default.nix @@ -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 ]; }; }