2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchCrate
|
|
|
|
, curl
|
|
|
|
, pkg-config
|
2024-02-29 20:09:43 +00:00
|
|
|
, libgit2
|
2022-11-21 17:40:18 +00:00
|
|
|
, openssl
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-unused-features";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "0.2.0";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-gdwIbbQDw/DgBV9zY2Rk/oWjPv1SS/+oFnocsMo2Axo=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
cargoHash = "sha256-K9I7Eg43BS2SKq5zZ3eZrMkmuHAx09OX240sH0eGs+k=";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
curl.dev
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
2024-02-29 20:09:43 +00:00
|
|
|
libgit2
|
2022-11-21 17:40:18 +00:00
|
|
|
openssl
|
2023-08-10 07:59:29 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
env = {
|
|
|
|
LIBGIT2_NO_VENDOR = 1;
|
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool to find potential unused enabled feature flags and prune them";
|
2022-11-21 17:40:18 +00:00
|
|
|
homepage = "https://github.com/timonpost/cargo-unused-features";
|
|
|
|
license = licenses.mit;
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ figsoda matthiasbeyer ];
|
2022-11-21 17:40:18 +00:00
|
|
|
mainProgram = "unused-features";
|
|
|
|
};
|
|
|
|
}
|