2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
testers,
|
|
|
|
cargo-shear,
|
|
|
|
}:
|
|
|
|
let
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.0.26";
|
2024-05-15 15:35:15 +00:00
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "cargo-shear";
|
2024-05-15 15:35:15 +00:00
|
|
|
inherit version;
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Boshen";
|
|
|
|
repo = "cargo-shear";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-c3gicJWMiMZ0Suo30XcQoWhHRE3aXdQmSD0K5y2Quec=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cargoHash = "sha256-Clhd8ifbT+it0EGcysJvI9O89qzee9T6EGWlcMO8osE=";
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
# https://github.com/Boshen/cargo-shear/blob/a0535415a3ea94c86642f39f343f91af5cdc3829/src/lib.rs#L20-L23
|
|
|
|
SHEAR_VERSION = version;
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = cargo-shear;
|
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
meta = {
|
2024-04-21 15:54:59 +00:00
|
|
|
description = "Detect and remove unused dependencies from Cargo.toml";
|
|
|
|
mainProgram = "cargo-shear";
|
|
|
|
homepage = "https://github.com/Boshen/cargo-shear";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/Boshen/cargo-shear/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = [ lib.licenses.mit ];
|
|
|
|
maintainers = with lib.maintainers; [ uncenter ];
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
}
|