mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
39 lines
994 B
Nix
39 lines
994 B
Nix
{
|
|
fetchFromGitHub,
|
|
lib,
|
|
rustPlatform,
|
|
testers,
|
|
cargo-shear,
|
|
}:
|
|
let
|
|
version = "1.1.4";
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
pname = "cargo-shear";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Boshen";
|
|
repo = "cargo-shear";
|
|
rev = "v${version}";
|
|
hash = "sha256-40LBTB/lDY1UxK2dCqZJu1CUIqJxMbDxpSTlSLClpVY=";
|
|
};
|
|
|
|
cargoHash = "sha256-GmNKUv0jfQ59pG8AspZT1NTX0AJQ9xl93LbCgUzPllo=";
|
|
|
|
# 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 ];
|
|
};
|
|
}
|