Files
nixpkgs/pkgs/by-name/ze/zenith/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
1.2 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
nvidiaSupport ? false,
makeWrapper,
}:
rustPlatform.buildRustPackage rec {
pname = "zenith";
version = "0.14.1";
src = fetchFromGitHub {
owner = "bvaisvil";
repo = "zenith";
rev = version;
hash = "sha256-y+/s0TDVAFGio5uCzHjf+kHFZB0G8dDgTt2xaqSSz1c=";
};
# remove cargo config so it can find the linker on aarch64-linux
postPatch = ''
rm .cargo/config
'';
cargoHash = "sha256-xfp+nR4ihaTO4AZHizYg4qqf9MR030Qb5bN2nzhbytQ=";
nativeBuildInputs = [ rustPlatform.bindgenHook ] ++ lib.optional nvidiaSupport makeWrapper;
buildFeatures = lib.optional nvidiaSupport "nvidia";
postInstall = lib.optionalString nvidiaSupport ''
wrapProgram $out/bin/zenith \
--suffix LD_LIBRARY_PATH : "/run/opengl-driver/lib"
'';
meta = with lib; {
description =
"Sort of like top or htop but with zoom-able charts, network, and disk usage"
+ lib.optionalString nvidiaSupport ", and NVIDIA GPU usage";
mainProgram = "zenith";
homepage = "https://github.com/bvaisvil/zenith";
license = licenses.mit;
maintainers = with maintainers; [ wegank ];
platforms = if nvidiaSupport then platforms.linux else platforms.unix;
};
}