nixpkgs/pkgs/by-name/ca/cargo-unused-features/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
990 B
Nix
Raw Normal View History

2022-11-11 15:12:31 +00:00
{ lib
, rustPlatform
, fetchCrate
, curl
, pkg-config
2024-02-11 22:28:05 +00:00
, libgit2
2022-11-11 15:12:31 +00:00
, openssl
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-unused-features";
version = "0.2.0";
2022-11-11 15:12:31 +00:00
src = fetchCrate {
inherit pname version;
hash = "sha256-gdwIbbQDw/DgBV9zY2Rk/oWjPv1SS/+oFnocsMo2Axo=";
2022-11-11 15:12:31 +00:00
};
cargoHash = "sha256-K9I7Eg43BS2SKq5zZ3eZrMkmuHAx09OX240sH0eGs+k=";
2022-11-11 15:12:31 +00:00
nativeBuildInputs = [
curl.dev
pkg-config
];
buildInputs = [
curl
2024-02-11 22:28:05 +00:00
libgit2
2022-11-11 15:12:31 +00:00
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Security
];
2022-11-11 15:12:31 +00:00
2024-02-11 22:28:05 +00:00
env = {
LIBGIT2_NO_VENDOR = 1;
};
2022-11-11 15:12:31 +00:00
meta = with lib; {
description = "Tool to find potential unused enabled feature flags and prune them";
homepage = "https://github.com/timonpost/cargo-unused-features";
license = licenses.mit;
maintainers = with maintainers; [ figsoda matthiasbeyer ];
2022-11-11 15:12:31 +00:00
mainProgram = "unused-features";
};
}