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
|
2023-04-12 12:48:02 +00:00
|
|
|
, libgit2_1_5
|
2021-12-06 16:07:01 +00:00
|
|
|
, openssl
|
2023-04-12 12:48:02 +00:00
|
|
|
, zlib
|
2021-12-19 01:06:50 +00:00
|
|
|
, zstd
|
2021-12-06 16:07:01 +00:00
|
|
|
, stdenv
|
|
|
|
, curl
|
2023-04-12 12:48:02 +00:00
|
|
|
, darwin
|
2020-05-03 17:38:23 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-deny";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.13.9";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "EmbarkStudios";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-fkbYPn7GmnOgLvJqbizVKKLBnzVn0Ji6jQc23DimIX4=";
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
cargoHash = "sha256-WHr2Ky0LlK/EVOrSK3MF9Yt/Qe/6o7Ftx7X8iECj6pM=";
|
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
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
buildInputs = [
|
|
|
|
libgit2_1_5
|
|
|
|
openssl
|
|
|
|
zlib
|
|
|
|
zstd
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
curl
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
buildNoDefaultFeatures = true;
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
env = {
|
|
|
|
ZSTD_SYS_USE_PKG_CONFIG = true;
|
|
|
|
};
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|