onefetch: 2.10.2 -> 2.11.0
This commit is contained in:
parent
c1801065f4
commit
1316a83f43
|
@ -3,6 +3,8 @@
|
||||||
, lib
|
, lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
|
, pkg-config
|
||||||
|
, zstd
|
||||||
, CoreFoundation
|
, CoreFoundation
|
||||||
, libiconv
|
, libiconv
|
||||||
, libresolv
|
, libresolv
|
||||||
|
@ -11,18 +13,24 @@
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "onefetch";
|
pname = "onefetch";
|
||||||
version = "2.10.2";
|
version = "2.11.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "o2sh";
|
owner = "o2sh";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-lrRp01ZeK9bGn7L7SqAxJAU9qugpHnC06CWChhVPGGQ=";
|
sha256 = "sha256-16oiZAyj6haBk6mgUT25pPDUrCMd7pGo2kAQ0gTe2kM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "sha256-vNa1OF1x/MCTo9B4DTDZNWyHTsOl7Za3EgjnpsL/gWg=";
|
# enable pkg-config feature of zstd
|
||||||
|
cargoPatches = [ ./zstd-pkg-config.patch ];
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation libiconv libresolv Security ];
|
cargoSha256 = "sha256-6wnfn33mfye5o/vY1JQX1Lc4+jzHiKKgGsSLxeJWyFc=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
|
||||||
|
buildInputs = [ zstd ]
|
||||||
|
++ lib.optionals stdenv.isDarwin [ CoreFoundation libiconv libresolv Security ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Git repository summary on your terminal";
|
description = "Git repository summary on your terminal";
|
||||||
|
|
31
pkgs/tools/misc/onefetch/zstd-pkg-config.patch
Normal file
31
pkgs/tools/misc/onefetch/zstd-pkg-config.patch
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
diff --git a/Cargo.lock b/Cargo.lock
|
||||||
|
index 202cda0..bc864cc 100644
|
||||||
|
--- a/Cargo.lock
|
||||||
|
+++ b/Cargo.lock
|
||||||
|
@@ -872,6 +872,7 @@ dependencies = [
|
||||||
|
"tokei",
|
||||||
|
"toml",
|
||||||
|
"yaml-rust",
|
||||||
|
+ "zstd-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
@@ -1678,4 +1679,5 @@ checksum = "2141bed8922b427761470e6bbfeff255da94fa20b0bbeab0d9297fcaf71e3aa7"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"libc",
|
||||||
|
+ "pkg-config",
|
||||||
|
]
|
||||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
|
index 8e0b5ff..48959b4 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -57,6 +57,8 @@ libc = "0.2.112"
|
||||||
|
[dev-dependencies]
|
||||||
|
more-asserts = "0.2"
|
||||||
|
paste = "1.0.6"
|
||||||
|
+# Specify that the indirect dependency ztsd-sys should pick up the system zstd C library
|
||||||
|
+zstd-sys = { version = "1", features = [ "pkg-config" ] }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
fail-on-deprecated = []
|
Loading…
Reference in a new issue