2021-07-04 00:40:07 +00:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, lib
|
|
|
|
, stdenv
|
2022-01-24 03:09:15 +00:00
|
|
|
, pkg-config
|
|
|
|
, zstd
|
2021-07-04 00:40:07 +00:00
|
|
|
, CoreFoundation
|
|
|
|
, libiconv
|
|
|
|
, libresolv
|
|
|
|
, Security
|
|
|
|
}:
|
2019-11-25 20:06:35 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "onefetch";
|
2022-03-29 23:23:45 +00:00
|
|
|
version = "2.12.0";
|
2019-11-25 20:06:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "o2sh";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-03-29 23:23:45 +00:00
|
|
|
sha256 = "sha256-nSvqAXzA/4CSnOMCZri2ks58bW+9v+SoyIIzb+K5S88=";
|
2019-11-25 20:06:35 +00:00
|
|
|
};
|
|
|
|
|
2022-03-20 03:11:30 +00:00
|
|
|
cargoPatches = [
|
|
|
|
# enable pkg-config feature of zstd
|
|
|
|
./zstd-pkg-config.patch
|
|
|
|
];
|
2019-11-25 20:06:35 +00:00
|
|
|
|
2022-03-29 23:23:45 +00:00
|
|
|
cargoSha256 = "sha256-uSef6x5QkXKwajglbwyoIsUFGbz0zntVM1ko0FZqnck=";
|
2022-01-24 03:09:15 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ zstd ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ CoreFoundation libiconv libresolv Security ];
|
2019-11-25 20:06:35 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-11-25 20:06:35 +00:00
|
|
|
description = "Git repository summary on your terminal";
|
|
|
|
homepage = "https://github.com/o2sh/onefetch";
|
|
|
|
license = licenses.mit;
|
2021-07-04 00:40:07 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne kloenk SuperSandro2000 ];
|
2019-11-25 20:06:35 +00:00
|
|
|
};
|
|
|
|
}
|