depot/third_party/nixpkgs/pkgs/by-name/ca/cargo-shear/package.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

38 lines
995 B
Nix

{
fetchFromGitHub,
lib,
rustPlatform,
testers,
cargo-shear,
}:
let
version = "0.0.25";
in
rustPlatform.buildRustPackage {
pname = "cargo-shear";
inherit version;
src = fetchFromGitHub {
owner = "Boshen";
repo = "cargo-shear";
rev = "v${version}";
hash = "sha256-4NnCUe4DrnSeveicxvvDF49hrc4NdRx/N10PH7Q0k8k=";
};
cargoHash = "sha256-gHXJz3Xw9vC04q001kd6AgEKKaRtAK3oGMn7JJh+Neo=";
# 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 ];
};
}