summary refs log tree commit diff
path: root/pkgs/development/tools/rust
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2021-12-08 10:41:51 -0500
committerGitHub <noreply@github.com>2021-12-08 10:41:51 -0500
commit9906615a6100a6daf875ef6bd1b68e9f6094fb25 (patch)
tree93e7b30c6276964d7b5e7bfe048a139e8488cc9f /pkgs/development/tools/rust
parentcb3996a291e2a89e264f323a5b72d2f785156caf (diff)
parent700a66f5ac656881cc9cfe86478e9946170e34c9 (diff)
downloadnixpkgs-9906615a6100a6daf875ef6bd1b68e9f6094fb25.tar
nixpkgs-9906615a6100a6daf875ef6bd1b68e9f6094fb25.tar.gz
nixpkgs-9906615a6100a6daf875ef6bd1b68e9f6094fb25.tar.bz2
nixpkgs-9906615a6100a6daf875ef6bd1b68e9f6094fb25.tar.lz
nixpkgs-9906615a6100a6daf875ef6bd1b68e9f6094fb25.tar.xz
nixpkgs-9906615a6100a6daf875ef6bd1b68e9f6094fb25.tar.zst
nixpkgs-9906615a6100a6daf875ef6bd1b68e9f6094fb25.zip
Merge pull request #149007 from figsoda/update-cargo-deny
cargo-deny: 0.10.2 -> 0.11.0
Diffstat (limited to 'pkgs/development/tools/rust')
-rw-r--r--pkgs/development/tools/rust/cargo-deny/default.nix15
-rw-r--r--pkgs/development/tools/rust/cargo-deny/zstd-pkg-config.patch29
2 files changed, 39 insertions, 5 deletions
diff --git a/pkgs/development/tools/rust/cargo-deny/default.nix b/pkgs/development/tools/rust/cargo-deny/default.nix
index 54cf8c4de57..b895ff703e4 100644
--- a/pkgs/development/tools/rust/cargo-deny/default.nix
+++ b/pkgs/development/tools/rust/cargo-deny/default.nix
@@ -3,6 +3,7 @@
 , fetchFromGitHub
 , pkg-config
 , openssl
+, zstd
 , stdenv
 , curl
 , Security
@@ -10,26 +11,30 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-deny";
-  version = "0.10.2";
+  version = "0.11.0";
 
   src = fetchFromGitHub {
     owner = "EmbarkStudios";
     repo = pname;
     rev = version;
-    sha256 = "sha256-QgaiyGBz23x3HkUv8fMNgEQyBvtPoZPbRCCVOQ5cJd0=";
+    sha256 = "sha256-LYXwdOopQkgq7i4l8dqQFkNLB3r+CVRor4BVeoj0DPs=";
   };
 
-  cargoSha256 = "sha256-Q334bsDFs0AT8ZZDcbT8PyYUK9nF3GIeVjlGkcbObAo=";
+  # enable pkg-config feature of zstd
+  cargoPatches = [ ./zstd-pkg-config.patch ];
 
-  doCheck = false;
+  cargoSha256 = "sha256-SdbDWw4GOvCTKN7vBjhLU5rhdVIpyO+AWaFbo06HXfU=";
 
   nativeBuildInputs = [ pkg-config ];
 
-  buildInputs = [ openssl ]
+  buildInputs = [ openssl zstd ]
     ++ lib.optionals stdenv.isDarwin [ curl Security ];
 
   buildNoDefaultFeatures = true;
 
+  # tests require internet access
+  doCheck = false;
+
   meta = with lib; {
     description = "Cargo plugin to generate list of all licenses for a crate";
     homepage = "https://github.com/EmbarkStudios/cargo-deny";
diff --git a/pkgs/development/tools/rust/cargo-deny/zstd-pkg-config.patch b/pkgs/development/tools/rust/cargo-deny/zstd-pkg-config.patch
new file mode 100644
index 00000000000..346d49e26d0
--- /dev/null
+++ b/pkgs/development/tools/rust/cargo-deny/zstd-pkg-config.patch
@@ -0,0 +1,29 @@
+--- 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"