2022-02-20 05:27:41 +00:00
|
|
|
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gotop";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "4.1.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xxxserxxx";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
hash = "sha256-oDM+dpAT1vDpp2NkD669hwbgw7HWJGFqhsql9PvbxSk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
proxyVendor = true;
|
2022-02-20 05:27:41 +00:00
|
|
|
vendorSha256 = "sha256-WGLcpF1NqVQDiU3M9rQ555ZW3sDC3Szch+skTZgt0xg=";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.Version=v${version}" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
postInstall = ''
|
|
|
|
$out/bin/gotop --create-manpage > gotop.1
|
|
|
|
installManPage gotop.1
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A terminal based graphical activity monitor inspired by gtop and vtop";
|
|
|
|
homepage = "https://github.com/xxxserxxx/gotop";
|
2021-07-24 12:14:16 +00:00
|
|
|
changelog = "https://github.com/xxxserxxx/gotop/raw/v${version}/CHANGELOG.md";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.magnetophon ];
|
2021-12-26 17:43:05 +00:00
|
|
|
broken = stdenv.isDarwin; # needs to update gopsutil to at least v3.21.3 to include https://github.com/shirou/gopsutil/pull/1042
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|