nixpkgs/pkgs/tools/package-management/cargo-audit/default.nix
Benjamin Hipple eb11feaa0b treewide: change fetchCargoTarball default to opt-out
Changes the default fetcher in the Rust Platform to be the newer
`fetchCargoTarball`, and changes every application using the current default to
instead opt out.

This commit does not change any hashes or cause any rebuilds. Once integrated,
we will start deleting the opt-outs and recomputing hashes.

See #79975 for details.
2020-02-13 22:41:37 -08:00

32 lines
1012 B
Nix

{ stdenv, lib, rustPlatform, fetchFromGitHub, openssl, pkg-config, Security, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "cargo-audit";
version = "0.10.0";
src = fetchFromGitHub {
owner = "RustSec";
repo = "cargo-audit";
rev = "v${version}";
sha256 = "1977ykablfi4mc6j2iil0bxc6diy07vi5hm56xmqj3n37ziavf1m";
};
# Delete this on next update; see #79975 for details
legacyCargoFetcher = true;
cargoSha256 = "0zbnsq0cif0yppn8ygxhcsrshkbf1c801f8waqqb2d1rjsrhb93y";
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;
};
}