depot/third_party/nixpkgs/pkgs/tools/package-management/cargo-audit/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

28 lines
927 B
Nix

{ stdenv, lib, rustPlatform, fetchFromGitHub, openssl, pkg-config, Security, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "cargo-audit";
version = "0.11.2";
src = fetchFromGitHub {
owner = "RustSec";
repo = "cargo-audit";
rev = "v${version}";
sha256 = "0py4z50ld4vs0g7vh8ga6v5h11nz2yfcpr3xqzpihf4p7sg1mdf4";
};
cargoSha256 = "0n4q8767aby6fgq0z7wj966zgqydlwirrzgyahf234dz6arsxw2l";
buildInputs = [ openssl libiconv ] ++ lib.optionals stdenv.isDarwin [ Security ];
nativeBuildInputs = [ pkg-config ];
# 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";
license = with licenses; [ mit asl20 ];
maintainers = with maintainers; [ basvandijk ];
platforms = platforms.all;
};
}