depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-valgrind/default.nix
Default email d0d8e8fc71 Project import generated by Copybara.
GitOrigin-RevId: d3f7e969b9860fb80750147aeb56dab1c730e756
2021-03-23 19:22:30 +00:00

43 lines
1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, nix-update-script
, makeWrapper
, valgrind
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-valgrind";
version = "2.0.0";
src = fetchFromGitHub {
owner = "jfrimmel";
repo = "cargo-valgrind";
rev = version;
sha256 = "0knsq6n3wrsd3ir2r1wpxm6ks7rgkw33bk008s8fq33m3bq2yvm7";
};
cargoSha256 = "09mhdi12wgg7s4wdnn0vfxhj7hwj5hjrq32mjgjr2hwm6yzhkzr2";
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/cargo-valgrind --prefix PATH : ${lib.makeBinPath [ valgrind ]}
'';
# Disable check phase as there are failures (2 tests fail)
doCheck = false;
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 ];
};
}