depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-deny/default.nix
Default email 81047829ea Project import generated by Copybara.
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
2022-02-10 15:34:41 -05:00

45 lines
1.1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, zstd
, stdenv
, curl
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-deny";
version = "0.11.1";
src = fetchFromGitHub {
owner = "EmbarkStudios";
repo = pname;
rev = version;
sha256 = "sha256-LsRky7hc7mgx1iRpJZICmP/ofdfD9r3D5LURTqfI9Fo=";
};
# enable pkg-config feature of zstd
cargoPatches = [ ./zstd-pkg-config.patch ];
cargoSha256 = "sha256-7WGNaad00MqEM/OdUaLJ3McXlUQyQwPezbMbL+4se5A=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl zstd ]
++ lib.optionals stdenv.isDarwin [ curl Security ];
buildNoDefaultFeatures = true;
# tests require internet access
doCheck = false;
meta = with lib; {
description = "Cargo plugin to generate list of all licenses for a crate";
homepage = "https://github.com/EmbarkStudios/cargo-deny";
changelog = "https://github.com/EmbarkStudios/cargo-deny/blob/${version}/CHANGELOG.md";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ figsoda matthiasbeyer jk ];
};
}