2022-02-14 23:58:50 +01:00
|
|
|
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2018-04-12 16:15:13 +02:00
|
|
|
|
2020-03-03 10:20:00 +01:00
|
|
|
buildGoModule rec {
|
2019-04-10 22:22:48 +02:00
|
|
|
pname = "gotop";
|
2022-07-15 21:05:20 +02:00
|
|
|
version = "4.1.4";
|
2018-04-12 16:15:13 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-03-03 10:20:00 +01:00
|
|
|
owner = "xxxserxxx";
|
2019-04-10 22:22:48 +02:00
|
|
|
repo = pname;
|
2020-03-03 10:20:00 +01:00
|
|
|
rev = "v${version}";
|
2022-07-15 21:05:20 +02:00
|
|
|
hash = "sha256-jAUlaj9Nv/ipzxAkG2myd9DIboHj7IarNMVk/FQ274g=";
|
2018-04-12 16:15:13 +02:00
|
|
|
};
|
|
|
|
|
2022-01-01 06:05:04 +01:00
|
|
|
proxyVendor = true;
|
2022-07-15 21:05:20 +02:00
|
|
|
vendorSha256 = "sha256-y4hVouvqMYUrdF7fowsvJLp0FCGCZDeVGUQXG8z8Lyg=";
|
2020-03-03 10:20:00 +01:00
|
|
|
|
2021-07-21 15:37:14 +02:00
|
|
|
ldflags = [ "-s" "-w" "-X main.Version=v${version}" ];
|
2021-02-06 13:52:00 +01:00
|
|
|
|
2022-02-14 23:58:50 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-08-15 02:57:56 +02:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
2020-08-04 02:26:27 +02:00
|
|
|
|
2021-07-21 02:00:00 +02:00
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2022-02-14 23:58:50 +01:00
|
|
|
postInstall = ''
|
|
|
|
$out/bin/gotop --create-manpage > gotop.1
|
|
|
|
installManPage gotop.1
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-04-12 16:15:13 +02:00
|
|
|
description = "A terminal based graphical activity monitor inspired by gtop and vtop";
|
2020-03-03 10:20:00 +01:00
|
|
|
homepage = "https://github.com/xxxserxxx/gotop";
|
2021-07-21 02:00:00 +02:00
|
|
|
changelog = "https://github.com/xxxserxxx/gotop/raw/v${version}/CHANGELOG.md";
|
2021-01-27 14:10:11 +01:00
|
|
|
license = licenses.mit;
|
2018-04-12 16:15:13 +02:00
|
|
|
maintainers = [ maintainers.magnetophon ];
|
2021-12-23 06:07:22 +01:00
|
|
|
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 16:15:13 +02:00
|
|
|
};
|
2020-07-31 05:58:04 +02:00
|
|
|
}
|