2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, zstd
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-about";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "0.5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "EmbarkStudios";
|
|
|
|
repo = "cargo-about";
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = version;
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "sha256-8476jJK1oiXVX9G09NSL+xvXZdZ+h7grCHC6R0XXewo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
cargoPatches = [
|
|
|
|
# update mimalloc to fix build with older apple sdks
|
|
|
|
./update-mimalloc.patch
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
# enable pkg-config feature of zstd
|
|
|
|
./zstd-pkg-config.patch
|
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
cargoSha256 = "sha256-EFpkBWQSWYyMrUa9Dh+n9kDNmXL/2yuEmFN3DcPeE7U=";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = [ zstd ] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Cargo plugin to generate list of all licenses for a crate";
|
|
|
|
homepage = "https://github.com/EmbarkStudios/cargo-about";
|
2021-12-06 16:07:01 +00:00
|
|
|
changelog = "https://github.com/EmbarkStudios/cargo-about/blob/${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ evanjs figsoda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|