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
|
, rustPlatform
|
||||||
, lib
|
, fetchFromGitHub
|
||||||
, stdenv
|
, cmake
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, zstd
|
, zstd
|
||||||
|
, stdenv
|
||||||
, CoreFoundation
|
, CoreFoundation
|
||||||
, libiconv
|
|
||||||
, libresolv
|
, libresolv
|
||||||
, Security
|
, Security
|
||||||
|
, git
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "onefetch";
|
pname = "onefetch";
|
||||||
version = "2.12.0";
|
version = "2.13.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "o2sh";
|
owner = "o2sh";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-nSvqAXzA/4CSnOMCZri2ks58bW+9v+SoyIIzb+K5S88=";
|
sha256 = "sha256-ydRdnzOI9syfF2ox9vHA9Q0j8C7ZNb0b7CJfqUprPA0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cargoSha256 = "sha256-IprUSNxoojagXUO/I7WDGJMG0U541ioe4qgLT4hqmbY=";
|
||||||
|
|
||||||
cargoPatches = [
|
cargoPatches = [
|
||||||
# enable pkg-config feature of zstd
|
# enable pkg-config feature of zstd
|
||||||
./zstd-pkg-config.patch
|
./zstd-pkg-config.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
cargoSha256 = "sha256-uSef6x5QkXKwajglbwyoIsUFGbz0zntVM1ko0FZqnck=";
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
|
||||||
|
|
||||||
buildInputs = [ zstd ]
|
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; {
|
meta = with lib; {
|
||||||
description = "Git repository summary on your terminal";
|
description = "Git repository summary on your terminal";
|
||||||
homepage = "https://github.com/o2sh/onefetch";
|
homepage = "https://github.com/o2sh/onefetch";
|
||||||
|
changelog = "https://github.com/o2sh/onefetch/blob/v${version}/CHANGELOG.md";
|
||||||
license = licenses.mit;
|
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
|
--- a/Cargo.lock
|
||||||
+++ b/Cargo.lock
|
+++ b/Cargo.lock
|
||||||
@@ -872,6 +872,7 @@ dependencies = [
|
@@ -2039,6 +2039,7 @@ dependencies = [
|
||||||
"tokei",
|
"tokei",
|
||||||
"toml",
|
"toml",
|
||||||
"yaml-rust",
|
"yaml-rust",
|
||||||
+ "zstd-sys",
|
+ "zstd",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1678,4 +1679,5 @@ checksum = "2141bed8922b427761470e6bbfeff255da94fa20b0bbeab0d9297fcaf71e3aa7"
|
@@ -3286,4 +3287,5 @@ checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
+ "pkg-config",
|
+ "pkg-config",
|
||||||
]
|
]
|
||||||
diff --git a/Cargo.toml b/Cargo.toml
|
|
||||||
index 8e0b5ff..48959b4 100644
|
|
||||||
--- a/Cargo.toml
|
--- a/Cargo.toml
|
||||||
+++ b/Cargo.toml
|
+++ b/Cargo.toml
|
||||||
@@ -57,6 +57,8 @@ libc = "0.2.112"
|
@@ -58,6 +58,7 @@ time-humanize = { version = "0.1.3", features = ["time"] }
|
||||||
[dev-dependencies]
|
tokei = "12.1.2"
|
||||||
more-asserts = "0.2"
|
toml = "0.5.9"
|
||||||
paste = "1.0.7"
|
yaml-rust = "0.4.5"
|
||||||
+# Specify that the indirect dependency ztsd-sys should pick up the system zstd C library
|
+zstd = { version = "*", features = ["pkg-config"] }
|
||||||
+zstd-sys = { version = "1", features = [ "pkg-config" ] }
|
|
||||||
|
|
||||||
[features]
|
[target.'cfg(windows)'.dependencies]
|
||||||
fail-on-deprecated = []
|
enable-ansi-support = "0.1.2"
|
||||||
|
|
Loading…
Reference in a new issue