depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-deny/default.nix
Default email 1be0098156 Project import generated by Copybara.
GitOrigin-RevId: 667e5581d16745bcda791300ae7e2d73f49fff25
2022-11-04 13:27:35 +01: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.13.4";
src = fetchFromGitHub {
owner = "EmbarkStudios";
repo = pname;
rev = version;
sha256 = "sha256-GmuBWvDy4UfEvR3znj8BQiIHzu5KSY4rgOc+I/GGJZU=";
};
# enable pkg-config feature of zstd
cargoPatches = [ ./zstd-pkg-config.patch ];
cargoSha256 = "sha256-Mm/IzEAOSDbO9c+C12Y6BNHlxKVVM+gOK1mGLtaJO2A=";
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 ];
};
}