Merge pull request #198715 from SuperSandro2000/onefetch

authored by Sandro and committed by GitHub ea193702 76d5ecd0

+34 -26
+24 -11
pkgs/tools/misc/onefetch/default.nix
··· 1 - { fetchFromGitHub 1 + { lib 2 2 , rustPlatform 3 - , lib 4 - , stdenv 3 + , fetchFromGitHub 4 + , cmake 5 5 , pkg-config 6 6 , zstd 7 + , stdenv 7 8 , CoreFoundation 8 - , libiconv 9 9 , libresolv 10 10 , Security 11 + , git 11 12 }: 12 13 13 14 rustPlatform.buildRustPackage rec { 14 15 pname = "onefetch"; 15 - version = "2.12.0"; 16 + version = "2.13.2"; 16 17 17 18 src = fetchFromGitHub { 18 19 owner = "o2sh"; 19 20 repo = pname; 20 21 rev = "v${version}"; 21 - sha256 = "sha256-nSvqAXzA/4CSnOMCZri2ks58bW+9v+SoyIIzb+K5S88="; 22 + sha256 = "sha256-ydRdnzOI9syfF2ox9vHA9Q0j8C7ZNb0b7CJfqUprPA0="; 22 23 }; 23 24 25 + cargoSha256 = "sha256-IprUSNxoojagXUO/I7WDGJMG0U541ioe4qgLT4hqmbY="; 26 + 24 27 cargoPatches = [ 25 28 # enable pkg-config feature of zstd 26 29 ./zstd-pkg-config.patch 27 30 ]; 28 31 29 - cargoSha256 = "sha256-uSef6x5QkXKwajglbwyoIsUFGbz0zntVM1ko0FZqnck="; 32 + nativeBuildInputs = [ cmake pkg-config ]; 33 + 34 + buildInputs = [ zstd ] 35 + ++ lib.optionals stdenv.isDarwin [ CoreFoundation libresolv Security ]; 30 36 31 - nativeBuildInputs = [ pkg-config ]; 37 + checkInputs = [ 38 + git 39 + ]; 32 40 33 - buildInputs = [ zstd ] 34 - ++ lib.optionals stdenv.isDarwin [ CoreFoundation libiconv libresolv Security ]; 41 + preCheck = '' 42 + git init 43 + git config user.email nixbld@example.com 44 + git add . 45 + git commit -m test 46 + ''; 35 47 36 48 meta = with lib; { 37 49 description = "Git repository summary on your terminal"; 38 50 homepage = "https://github.com/o2sh/onefetch"; 51 + changelog = "https://github.com/o2sh/onefetch/blob/v${version}/CHANGELOG.md"; 39 52 license = licenses.mit; 40 - maintainers = with maintainers; [ Br1ght0ne kloenk SuperSandro2000 ]; 53 + maintainers = with maintainers; [ Br1ght0ne figsoda kloenk SuperSandro2000 ]; 41 54 }; 42 55 }
+10 -15
pkgs/tools/misc/onefetch/zstd-pkg-config.patch
··· 1 - diff --git a/Cargo.lock b/Cargo.lock 2 - index 202cda0..bc864cc 100644 3 1 --- a/Cargo.lock 4 2 +++ b/Cargo.lock 5 - @@ -872,6 +872,7 @@ dependencies = [ 3 + @@ -2039,6 +2039,7 @@ dependencies = [ 6 4 "tokei", 7 5 "toml", 8 6 "yaml-rust", 9 - + "zstd-sys", 7 + + "zstd", 10 8 ] 11 9 12 10 [[package]] 13 - @@ -1678,4 +1679,5 @@ checksum = "2141bed8922b427761470e6bbfeff255da94fa20b0bbeab0d9297fcaf71e3aa7" 11 + @@ -3286,4 +3287,5 @@ checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" 14 12 dependencies = [ 15 13 "cc", 16 14 "libc", 17 15 + "pkg-config", 18 16 ] 19 - diff --git a/Cargo.toml b/Cargo.toml 20 - index 8e0b5ff..48959b4 100644 21 17 --- a/Cargo.toml 22 18 +++ b/Cargo.toml 23 - @@ -57,6 +57,8 @@ libc = "0.2.112" 24 - [dev-dependencies] 25 - more-asserts = "0.2" 26 - paste = "1.0.7" 27 - +# Specify that the indirect dependency ztsd-sys should pick up the system zstd C library 28 - +zstd-sys = { version = "1", features = [ "pkg-config" ] } 19 + @@ -58,6 +58,7 @@ time-humanize = { version = "0.1.3", features = ["time"] } 20 + tokei = "12.1.2" 21 + toml = "0.5.9" 22 + yaml-rust = "0.4.5" 23 + +zstd = { version = "*", features = ["pkg-config"] } 29 24 30 - [features] 31 - fail-on-deprecated = [] 25 + [target.'cfg(windows)'.dependencies] 26 + enable-ansi-support = "0.1.2"