uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
45
pkgs/development/tools/rust/cargo-deny/default.nix
Normal file
45
pkgs/development/tools/rust/cargo-deny/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, openssl
|
||||
, zstd
|
||||
, stdenv
|
||||
, curl
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-deny";
|
||||
version = "0.12.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "EmbarkStudios";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-w64fdjKXiCaM+U28Hte+I0LPqmGKxbCVRUyhNWcVyTc=";
|
||||
};
|
||||
|
||||
# enable pkg-config feature of zstd
|
||||
cargoPatches = [ ./zstd-pkg-config.patch ];
|
||||
|
||||
cargoSha256 = "sha256-K9Ab4L/wnpUqe+gLKhtHX4fOgWXv6ZL9faa58hzdq/0=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
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";
|
||||
changelog = "https://github.com/EmbarkStudios/cargo-deny/blob/${version}/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ figsoda matthiasbeyer jk ];
|
||||
};
|
||||
}
|
||||
29
pkgs/development/tools/rust/cargo-deny/zstd-pkg-config.patch
Normal file
29
pkgs/development/tools/rust/cargo-deny/zstd-pkg-config.patch
Normal file
|
|
@ -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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue