2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nix-update-script
|
|
|
|
, makeWrapper
|
|
|
|
, valgrind
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-valgrind";
|
2022-09-14 18:05:37 +00:00
|
|
|
version = "2.1.0";
|
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}";
|
|
|
|
sha256 = "sha256-FCz15kMSKckifYWSTMGqJbRpZ8X/AM5dSw46dg8ERcY=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
cargoSha256 = "sha256-csSUe2qUIN2xKOMHWyM56FZyCwKPdfAI0NrFiDOtRiE=";
|
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'';
|
|
|
|
homepage = "https://github.com/jfrimmel/cargo-valgrind";
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = with maintainers; [ otavio ];
|
|
|
|
};
|
|
|
|
}
|