depot/third_party/nixpkgs/pkgs/by-name/ca/cargo-shear/package.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

38 lines
995 B
Nix

{
fetchFromGitHub,
lib,
rustPlatform,
testers,
cargo-shear,
}:
let
version = "0.0.26";
in
rustPlatform.buildRustPackage {
pname = "cargo-shear";
inherit version;
src = fetchFromGitHub {
owner = "Boshen";
repo = "cargo-shear";
rev = "v${version}";
hash = "sha256-c3gicJWMiMZ0Suo30XcQoWhHRE3aXdQmSD0K5y2Quec=";
};
cargoHash = "sha256-Clhd8ifbT+it0EGcysJvI9O89qzee9T6EGWlcMO8osE=";
# 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 ];
};
}