2021-07-03 22:51:42 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
2022-10-06 23:14:46 +00:00
|
|
|
, fetchCrate
|
2021-07-03 22:51:42 +00:00
|
|
|
, pkg-config
|
2022-10-06 23:14:46 +00:00
|
|
|
, openssl
|
|
|
|
, stdenv
|
2021-07-03 22:51:42 +00:00
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
2019-10-01 14:44:28 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-audit";
|
2022-10-06 23:14:46 +00:00
|
|
|
version = "0.17.2";
|
2019-10-01 14:44:28 +00:00
|
|
|
|
2022-10-06 23:14:46 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "sha256-fSdh8yCV+2AdAtF4eO2z8+uxOAf2N0IxqIFLw4B8dKE=";
|
2019-10-01 14:44:28 +00:00
|
|
|
};
|
|
|
|
|
2022-10-06 23:14:46 +00:00
|
|
|
cargoSha256 = "sha256-YCEQaUcTmZ9zTdGcDQkaVI0Dc8oIBvt840s3x9PUlrg=";
|
2021-07-03 22:51:42 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
2019-10-01 14:44:28 +00:00
|
|
|
|
2021-07-03 22:51:42 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Security
|
|
|
|
];
|
2019-10-01 14:44:28 +00:00
|
|
|
|
2022-10-06 23:14:46 +00:00
|
|
|
buildFeatures = [ "binary-scanning" "fix" ];
|
2021-03-24 03:36:26 +00:00
|
|
|
|
2019-10-01 14:44:28 +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";
|
|
|
|
homepage = "https://rustsec.org";
|
2022-10-06 23:14:46 +00:00
|
|
|
changelog = "https://github.com/rustsec/rustsec/blob/cargo-audit/v${version}/cargo-audit/CHANGELOG.md";
|
2022-05-23 17:46:32 +00:00
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
2022-10-06 23:14:46 +00:00
|
|
|
maintainers = with maintainers; [ basvandijk figsoda jk ];
|
2019-10-01 14:44:28 +00:00
|
|
|
};
|
|
|
|
}
|