2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
2022-10-21 18:38:19 +00:00
|
|
|
, fetchCrate
|
2021-07-14 22:03:04 +00:00
|
|
|
, pkg-config
|
2022-10-21 18:38:19 +00:00
|
|
|
, openssl
|
2023-10-09 19:29:22 +00:00
|
|
|
, zlib
|
2022-10-21 18:38:19 +00:00
|
|
|
, stdenv
|
2021-07-14 22:03:04 +00:00
|
|
|
, Security
|
2024-02-29 20:09:43 +00:00
|
|
|
, SystemConfiguration
|
2021-07-14 22:03:04 +00:00
|
|
|
}:
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-audit";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.20.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-hzy+AVWGWzWYupllrLSryoi4rXPM0+G6WBlRbf03xA8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-OOkJGdqEHNVbgZZIjQupGaSs4tB52b7kPGLKELUocn4=";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2023-10-09 19:29:22 +00:00
|
|
|
zlib
|
2021-07-14 22:03:04 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Security
|
2024-02-29 20:09:43 +00:00
|
|
|
SystemConfiguration
|
2021-07-14 22:03:04 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
buildFeatures = [ "fix" ];
|
2021-03-20 04:20:00 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# The tests require network access which is not available in sandboxed Nix builds.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Audit Cargo.lock files for crates with security vulnerabilities";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cargo-audit";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://rustsec.org";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/rustsec/rustsec/blob/cargo-audit/v${version}/cargo-audit/CHANGELOG.md";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
2022-10-21 18:38:19 +00:00
|
|
|
maintainers = with maintainers; [ basvandijk figsoda jk ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|