3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/system/gotop/default.nix

34 lines
976 B
Nix
Raw Normal View History

{ lib, stdenv, buildGoModule, fetchFromGitHub }:
2018-04-12 15:15:13 +01:00
buildGoModule rec {
2019-04-10 21:22:48 +01:00
pname = "gotop";
version = "4.1.2";
2018-04-12 15:15:13 +01:00
src = fetchFromGitHub {
owner = "xxxserxxx";
2019-04-10 21:22:48 +01:00
repo = pname;
rev = "v${version}";
sha256 = "15bsxaxqxp17wsr0p9fkpvgfyqnhhwm3j8jxkvcs4cdw73qaxdsy";
2018-04-12 15:15:13 +01:00
};
2020-08-15 01:57:56 +01:00
runVend = true;
vendorSha256 = "06hl1npwmy9dvpf4kljvw8lwwiigm52wf106lmf9k6k2gi5ikprz";
2021-07-21 14:37:14 +01:00
ldflags = [ "-s" "-w" "-X main.Version=v${version}" ];
2021-02-06 12:52:00 +00:00
2020-08-15 01:57:56 +01:00
preCheck = ''
export HOME=$(mktemp -d)
'';
doCheck = !stdenv.isDarwin;
meta = with lib; {
2018-04-12 15:15:13 +01:00
description = "A terminal based graphical activity monitor inspired by gtop and vtop";
homepage = "https://github.com/xxxserxxx/gotop";
changelog = "https://github.com/xxxserxxx/gotop/raw/v${version}/CHANGELOG.md";
license = licenses.mit;
2018-04-12 15:15:13 +01:00
maintainers = [ maintainers.magnetophon ];
broken = stdenv.isDarwin; # needs to update gopsutil to at least v3.21.3 to include https://github.com/shirou/gopsutil/pull/1042
2018-04-12 15:15:13 +01:00
};
}