{ 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; }; }