2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
2020-05-03 17:38:23 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, pkg-config
|
|
|
|
, openssl
|
2021-12-19 01:06:50 +00:00
|
|
|
, zstd
|
2021-12-06 16:07:01 +00:00
|
|
|
, stdenv
|
|
|
|
, curl
|
|
|
|
, Security
|
2020-05-03 17:38:23 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-deny";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "0.13.4";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "EmbarkStudios";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-11-04 12:27:35 +00:00
|
|
|
sha256 = "sha256-GmuBWvDy4UfEvR3znj8BQiIHzu5KSY4rgOc+I/GGJZU=";
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
# enable pkg-config feature of zstd
|
|
|
|
cargoPatches = [ ./zstd-pkg-config.patch ];
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
cargoSha256 = "sha256-Mm/IzEAOSDbO9c+C12Y6BNHlxKVVM+gOK1mGLtaJO2A=";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
buildInputs = [ openssl zstd ]
|
2021-12-06 16:07:01 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ curl Security ];
|
|
|
|
|
|
|
|
buildNoDefaultFeatures = true;
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
# tests require internet access
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Cargo plugin to generate list of all licenses for a crate";
|
|
|
|
homepage = "https://github.com/EmbarkStudios/cargo-deny";
|
2021-12-06 16:07:01 +00:00
|
|
|
changelog = "https://github.com/EmbarkStudios/cargo-deny/blob/${version}/CHANGELOG.md";
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ figsoda matthiasbeyer jk ];
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
}
|