Merge pull request #224998 from figsoda/cargo-deny

This commit is contained in:
figsoda
2023-04-07 09:12:10 -04:00
committed by GitHub
3 changed files with 20 additions and 41 deletions
@@ -2,36 +2,46 @@
, rustPlatform
, fetchFromGitHub
, pkg-config
, libgit2_1_5
, openssl
, zlib
, zstd
, stdenv
, curl
, Security
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-deny";
version = "0.13.7";
version = "0.13.8";
src = fetchFromGitHub {
owner = "EmbarkStudios";
repo = pname;
rev = version;
sha256 = "sha256-E9tFzac6WkEGfsXj1nykQAR20+5Pi5xMd82MeDed9qg=";
hash = "sha256-6RmC54DsL31/SBrA16p+iub7VTQvc1nG+ml+6Xaj0NM=";
};
# enable pkg-config feature of zstd
cargoPatches = [ ./zstd-pkg-config.patch ];
cargoSha256 = "sha256-E3Gg7PwBNVkvX2vqtbCxz0kbe1ZWrcAWxj6OJtENBe0=";
cargoHash = "sha256-u3hv1phSwZ4oILFMWIAqWhdt0jI8ao3gje1WZA3ZFo8=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl zstd ]
++ lib.optionals stdenv.isDarwin [ curl Security ];
buildInputs = [
libgit2_1_5
openssl
zlib
zstd
] ++ lib.optionals stdenv.isDarwin [
curl
darwin.apple_sdk.frameworks.Security
];
buildNoDefaultFeatures = true;
env = {
ZSTD_SYS_USE_PKG_CONFIG = true;
};
# tests require internet access
doCheck = false;
@@ -1,29 +0,0 @@
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -242,6 +242,7 @@ dependencies = [
"toml_edit",
"twox-hash",
"url",
+ "zstd",
]
[[package]]
@@ -1904,4 +1905,5 @@ checksum = "2141bed8922b427761470e6bbfeff255da94fa20b0bbeab0d9297fcaf71e3aa7"
dependencies = [
"cc",
"libc",
+ "pkg-config",
]
diff --git a/Cargo.toml b/Cargo.toml
index 8f24673..b59c350 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -92,6 +92,8 @@ twox-hash = { version = "1.5", default-features = false }
# Url parsing/manipulation
url = "2.1"
+zstd = { version = "*", features = ["pkg-config"] }
+
[dev-dependencies]
# Avoid loading license check many times
lazy_static = "1.4.0"
+1 -3
View File
@@ -16034,9 +16034,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration CoreFoundation;
};
cargo-cross = callPackage ../development/tools/rust/cargo-cross { };
cargo-deny = callPackage ../development/tools/rust/cargo-deny {
inherit (darwin.apple_sdk.frameworks) Security;
};
cargo-deny = callPackage ../development/tools/rust/cargo-deny { };
cargo-depgraph = callPackage ../development/tools/rust/cargo-depgraph { };
cargo-dephell = callPackage ../development/tools/rust/cargo-dephell {
inherit (darwin.apple_sdk.frameworks) Security;