2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nix-update-script
|
|
|
|
, makeWrapper
|
|
|
|
, valgrind
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-valgrind";
|
2023-02-22 10:55:15 +00:00
|
|
|
version = "2.1.1";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jfrimmel";
|
|
|
|
repo = "cargo-valgrind";
|
2022-09-14 18:05:37 +00:00
|
|
|
rev = "v${version}";
|
2023-02-22 10:55:15 +00:00
|
|
|
sha256 = "sha256-l/1paghG/ARD0JfzNh0xj2UD5kW6FddM8Xrd/FCygYc=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
cargoSha256 = "sha256-9/kIIZDIsOhUvRT3TyXN5PGFUB+a8m2yXmzBbsPUK28=";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/cargo-valgrind --prefix PATH : ${lib.makeBinPath [ valgrind ]}
|
|
|
|
'';
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
checkFlags = [
|
|
|
|
"--skip examples_are_runnable"
|
|
|
|
"--skip tests_are_runnable"
|
|
|
|
];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = ''Cargo subcommand "valgrind": runs valgrind and collects its output in a helpful manner'';
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cargo-valgrind";
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://github.com/jfrimmel/cargo-valgrind";
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ otavio matthiasbeyer ];
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
}
|