15 rustPlatform.buildRustPackage rec {
19 src = fetchFromGitHub {
23 hash = "sha256-KQs7b+skXQhHbfHIJkgowNY2FB6oS2V8TQFdkmElC/k=";
26 cargoHash = "sha256-gKA1MMahoaDFia8LR33GG3jRttZzHwpUpFawlCQcy7g=";
29 # enable pkg-config feature of zstd
30 ./zstd-pkg-config.patch
33 nativeBuildInputs = [ cmake installShellFiles pkg-config ];
35 buildInputs = [ zstd ]
36 ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation libresolv Security ];
44 git config user.name nixbld
45 git config user.email nixbld@example.com
50 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
51 installShellCompletion --cmd onefetch \
52 --bash <($out/bin/onefetch --generate bash) \
53 --fish <($out/bin/onefetch --generate fish) \
54 --zsh <($out/bin/onefetch --generate zsh)
58 description = "Git repository summary on your terminal";
59 homepage = "https://github.com/o2sh/onefetch";
60 changelog = "https://github.com/o2sh/onefetch/blob/v${version}/CHANGELOG.md";
61 license = licenses.mit;
62 maintainers = with maintainers; [ Br1ght0ne figsoda kloenk ];
63 mainProgram = "onefetch";