nixpkgs/pkgs/tools/misc/onefetch/default.nix
figsoda 9071413f40 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
2022-11-06 16:47:29 -05:00

56 lines
1.1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, cmake
, pkg-config
, zstd
, stdenv
, CoreFoundation
, libresolv
, Security
, git
}:
rustPlatform.buildRustPackage rec {
pname = "onefetch";
version = "2.13.2";
src = fetchFromGitHub {
owner = "o2sh";
repo = pname;
rev = "v${version}";
sha256 = "sha256-ydRdnzOI9syfF2ox9vHA9Q0j8C7ZNb0b7CJfqUprPA0=";
};
cargoSha256 = "sha256-IprUSNxoojagXUO/I7WDGJMG0U541ioe4qgLT4hqmbY=";
cargoPatches = [
# enable pkg-config feature of zstd
./zstd-pkg-config.patch
];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ zstd ]
++ 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 figsoda kloenk SuperSandro2000 ];
};
}