nixpkgs/pkgs/tools/package-management/cargo-audit/default.nix
2020-02-19 00:22:10 -05: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;
};
}