cargo-vet: refactor

This commit is contained in:
emaryn
2025-04-17 22:56:43 +08:00
parent 422b986bc3
commit 6441a16a24
2 changed files with 10 additions and 18 deletions
@@ -2,43 +2,37 @@
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
Security,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cargo-vet";
version = "0.10.1";
src = fetchFromGitHub {
owner = "mozilla";
repo = pname;
rev = "v${version}";
sha256 = "sha256-HSEhFCcdC79OA8MP73De+iLIjcr1XMHxfJ9a1Q3JJYI=";
repo = "cargo-vet";
tag = "v${finalAttrs.version}";
hash = "sha256-HSEhFCcdC79OA8MP73De+iLIjcr1XMHxfJ9a1Q3JJYI=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-+X6DLxWPWMcGzJMVZAj3C5P5MyywIb4ml0Jsyo9/uAE=";
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security;
# the test_project tests require internet access
checkFlags = [
"--skip=test_project"
];
checkFlags = [ "--skip=test_project" ];
meta = with lib; {
meta = {
description = "Tool to help projects ensure that third-party Rust dependencies have been audited by a trusted source";
mainProgram = "cargo-vet";
homepage = "https://mozilla.github.io/cargo-vet";
license = with licenses; [
license = with lib.licenses; [
asl20 # or
mit
];
maintainers = with maintainers; [
maintainers = with lib.maintainers; [
figsoda
jk
matthiasbeyer
];
};
}
})
+1 -3
View File
@@ -7009,9 +7009,7 @@ with pkgs;
cargo-udeps = callPackage ../development/tools/rust/cargo-udeps {
inherit (darwin.apple_sdk.frameworks) CoreServices Security SystemConfiguration;
};
cargo-vet = callPackage ../development/tools/rust/cargo-vet {
inherit (darwin.apple_sdk.frameworks) Security;
};
cargo-vet = callPackage ../development/tools/rust/cargo-vet { };
cargo-watch = callPackage ../development/tools/rust/cargo-watch {
inherit (darwin.apple_sdk.frameworks) Foundation Cocoa;
};