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