2021-11-05 03:11:03 +01:00
|
|
|
{ lib
|
2020-04-30 11:58:45 +02:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2021-11-05 03:11:03 +01:00
|
|
|
, pkg-config
|
|
|
|
, openssl
|
2021-12-06 14:19:40 +01:00
|
|
|
, zstd
|
2021-11-05 03:11:03 +01:00
|
|
|
, stdenv
|
|
|
|
, curl
|
|
|
|
, Security
|
2020-04-30 11:58:45 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-deny";
|
2022-02-15 10:19:00 +01:00
|
|
|
version = "0.11.3";
|
2020-04-30 11:58:45 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "EmbarkStudios";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-02-15 10:19:00 +01:00
|
|
|
sha256 = "sha256-QpYwH9ZmD/muCGtL+9wzz4UKRyHWaga7vrjNjKz4uVQ=";
|
2020-04-30 11:58:45 +02:00
|
|
|
};
|
|
|
|
|
2021-12-06 14:19:40 +01:00
|
|
|
# enable pkg-config feature of zstd
|
|
|
|
cargoPatches = [ ./zstd-pkg-config.patch ];
|
2020-04-30 11:58:45 +02:00
|
|
|
|
2022-02-15 10:19:00 +01:00
|
|
|
cargoSha256 = "sha256-DFGCjA0AENYDs5EnQ3WDkbCEw14ndjOh7qx2ZFgNGH0=";
|
2020-12-17 18:43:05 +01:00
|
|
|
|
2021-11-05 03:11:03 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-30 11:58:45 +02:00
|
|
|
|
2021-12-06 14:19:40 +01:00
|
|
|
buildInputs = [ openssl zstd ]
|
2021-11-05 03:11:03 +01:00
|
|
|
++ lib.optionals stdenv.isDarwin [ curl Security ];
|
|
|
|
|
2021-11-16 14:36:17 +01:00
|
|
|
buildNoDefaultFeatures = true;
|
2020-04-30 11:58:45 +02:00
|
|
|
|
2021-12-06 14:19:40 +01:00
|
|
|
# tests require internet access
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-30 11:58:45 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Cargo plugin to generate list of all licenses for a crate";
|
|
|
|
homepage = "https://github.com/EmbarkStudios/cargo-deny";
|
2021-11-05 03:11:03 +01:00
|
|
|
changelog = "https://github.com/EmbarkStudios/cargo-deny/blob/${version}/CHANGELOG.md";
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2022-01-28 16:42:44 +01:00
|
|
|
maintainers = with maintainers; [ figsoda matthiasbeyer jk ];
|
2020-04-30 11:58:45 +02:00
|
|
|
};
|
|
|
|
}
|