onefetch: minor improvements, add figsoda as a maintainer

* add back the zstd-pkg-config patch
* move cmake to nativeBuildInputs
* fix test instead of skipping it
This commit is contained in:
figsoda 2022-11-06 16:47:29 -05:00
parent f237e2b83e
commit 9071413f40
2 changed files with 47 additions and 12 deletions

View file

@ -1,14 +1,14 @@
{ fetchFromGitHub
{ lib
, rustPlatform
, lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, zstd
, stdenv
, CoreFoundation
, libiconv
, libresolv
, Security
, git
}:
rustPlatform.buildRustPackage rec {
@ -22,25 +22,34 @@ rustPlatform.buildRustPackage rec {
sha256 = "sha256-ydRdnzOI9syfF2ox9vHA9Q0j8C7ZNb0b7CJfqUprPA0=";
};
cargoSha256 = "sha256-rZC1CAEWx8l1EQNRs1KAfVgGgBut1hxg6Ug4780O3dw=";
cargoSha256 = "sha256-IprUSNxoojagXUO/I7WDGJMG0U541ioe4qgLT4hqmbY=";
nativeBuildInputs = [ pkg-config ];
cargoPatches = [
# enable pkg-config feature of zstd
./zstd-pkg-config.patch
];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ zstd ]
++ lib.optionals stdenv.isDarwin [ CoreFoundation libiconv libresolv Security ];
++ lib.optionals stdenv.isDarwin [ CoreFoundation libresolv Security ];
checkInputs = [
cmake
git
];
checkFlags = [
"--skip=info::tests::test_style_subtitle"
];
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 ];
};
}

View file

@ -0,0 +1,26 @@
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2039,6 +2039,7 @@ dependencies = [
"tokei",
"toml",
"yaml-rust",
+ "zstd",
]
[[package]]
@@ -3286,4 +3287,5 @@ checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b"
dependencies = [
"cc",
"libc",
+ "pkg-config",
]
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"] }
[target.'cfg(windows)'.dependencies]
enable-ansi-support = "0.1.2"