depot/third_party/nixpkgs/pkgs/by-name/ca/cargo-shear/package.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

38 lines
994 B
Nix

{
fetchFromGitHub,
lib,
rustPlatform,
testers,
cargo-shear,
}:
let
version = "1.1.0";
in
rustPlatform.buildRustPackage {
pname = "cargo-shear";
inherit version;
src = fetchFromGitHub {
owner = "Boshen";
repo = "cargo-shear";
rev = "v${version}";
hash = "sha256-D6O8raELxmcv47vaIa7XSmnPNhrsEx8fIpt/n1dp+8Y=";
};
cargoHash = "sha256-GpEG6yoRTmnjeC74tz6mq6vbG4hnIWbbijIIos7Ng3Y=";
# https://github.com/Boshen/cargo-shear/blob/a0535415a3ea94c86642f39f343f91af5cdc3829/src/lib.rs#L20-L23
SHEAR_VERSION = version;
passthru.tests.version = testers.testVersion {
package = cargo-shear;
};
meta = {
description = "Detect and remove unused dependencies from Cargo.toml";
mainProgram = "cargo-shear";
homepage = "https://github.com/Boshen/cargo-shear";
changelog = "https://github.com/Boshen/cargo-shear/blob/v${version}/CHANGELOG.md";
license = [ lib.licenses.mit ];
maintainers = with lib.maintainers; [ uncenter ];
};
}