forked from mirrors/nixpkgs
Merge pull request #198715 from SuperSandro2000/onefetch
This commit is contained in:
commit
ea19370231
|
@ -1,42 +1,55 @@
|
|||
{ fetchFromGitHub
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, zstd
|
||||
, stdenv
|
||||
, CoreFoundation
|
||||
, libiconv
|
||||
, libresolv
|
||||
, Security
|
||||
, git
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "onefetch";
|
||||
version = "2.12.0";
|
||||
version = "2.13.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "o2sh";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-nSvqAXzA/4CSnOMCZri2ks58bW+9v+SoyIIzb+K5S88=";
|
||||
sha256 = "sha256-ydRdnzOI9syfF2ox9vHA9Q0j8C7ZNb0b7CJfqUprPA0=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-IprUSNxoojagXUO/I7WDGJMG0U541ioe4qgLT4hqmbY=";
|
||||
|
||||
cargoPatches = [
|
||||
# enable pkg-config feature of zstd
|
||||
./zstd-pkg-config.patch
|
||||
];
|
||||
|
||||
cargoSha256 = "sha256-uSef6x5QkXKwajglbwyoIsUFGbz0zntVM1ko0FZqnck=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [ zstd ]
|
||||
++ lib.optionals stdenv.isDarwin [ CoreFoundation libiconv libresolv Security ];
|
||||
++ lib.optionals stdenv.isDarwin [ CoreFoundation libresolv Security ];
|
||||
|
||||
checkInputs = [
|
||||
git
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
git init
|
||||
git config user.email nixbld@example.com
|
||||
git add .
|
||||
git commit -m test
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Git repository summary on your terminal";
|
||||
homepage = "https://github.com/o2sh/onefetch";
|
||||
changelog = "https://github.com/o2sh/onefetch/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ Br1ght0ne kloenk SuperSandro2000 ];
|
||||
maintainers = with maintainers; [ Br1ght0ne figsoda kloenk SuperSandro2000 ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,31 +1,26 @@
|
|||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 202cda0..bc864cc 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -872,6 +872,7 @@ dependencies = [
|
||||
@@ -2039,6 +2039,7 @@ dependencies = [
|
||||
"tokei",
|
||||
"toml",
|
||||
"yaml-rust",
|
||||
+ "zstd-sys",
|
||||
+ "zstd",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1678,4 +1679,5 @@ checksum = "2141bed8922b427761470e6bbfeff255da94fa20b0bbeab0d9297fcaf71e3aa7"
|
||||
@@ -3286,4 +3287,5 @@ checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b"
|
||||
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.7"
|
||||
+# Specify that the indirect dependency ztsd-sys should pick up the system zstd C library
|
||||
+zstd-sys = { version = "1", features = [ "pkg-config" ] }
|
||||
@@ -58,6 +58,7 @@ time-humanize = { version = "0.1.3", features = ["time"] }
|
||||
tokei = "12.1.2"
|
||||
toml = "0.5.9"
|
||||
yaml-rust = "0.4.5"
|
||||
+zstd = { version = "*", features = ["pkg-config"] }
|
||||
|
||||
[features]
|
||||
fail-on-deprecated = []
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
enable-ansi-support = "0.1.2"
|
||||
|
|
Loading…
Reference in a new issue