2022-08-21 13:32:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gopsuinfo";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.1.5";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nwg-piotr";
|
|
|
|
repo = "gopsuinfo";
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-h+CdiQh7IguCduIMCCI/UPIUAdXlNSHdkz6hrG10h3c=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
vendorHash = "sha256-S2ZHfrbEjPDweazwWbMbEMcMl/i+8Nru0G0e7RjOJMk=";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
# Remove installing of binary from the Makefile (already taken care of by
|
|
|
|
# `buildGoModule`)
|
|
|
|
patches = [
|
|
|
|
./no_bin_install.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
# Fix absolute path of icons in the code
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace gopsuinfo.go \
|
|
|
|
--replace "/usr/share/gopsuinfo" "$out/usr/share/gopsuinfo"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Install icons
|
|
|
|
postInstall = '' make install DESTDIR=$out '';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Gopsutil-based command to display system usage info";
|
2022-08-21 13:32:41 +00:00
|
|
|
homepage = "https://github.com/nwg-piotr/gopsuinfo";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ otini ];
|
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "gopsuinfo";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
}
|