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-08-12 12:06:08 +00:00
|
|
|
version = "0.12.2";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "EmbarkStudios";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-2NfM1Gd+I9+XGuTyKXxoxH63mqR/G4YcvAjMU2Evhb0=";
|
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-08-12 12:06:08 +00:00
|
|
|
cargoSha256 = "sha256-6k35fv0HwHuu2k7V2GBjvdAajLVuXuFzVSpVSFF8y+s=";
|
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
|
|
|
};
|
|
|
|
}
|