nixpkgs/pkgs/tools/system/gopsuinfo/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1007 B
Nix
Raw Normal View History

2022-08-10 11:44:04 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "gopsuinfo";
2022-08-31 16:40:06 +00:00
version = "0.1.2";
2022-08-10 11:44:04 +00:00
src = fetchFromGitHub {
owner = "nwg-piotr";
repo = "gopsuinfo";
rev = "v${version}";
2022-08-31 16:40:06 +00:00
sha256 = "sha256-atUx035Tyy73AUBvhyo8cUHID5pTKj2/+PX9i/TRfoE=";
2022-08-10 11:44:04 +00:00
};
vendorSha256 = "sha256-RsplFwUL4KjWaXE6xvURX+4wkNG+i+1oyBXwLyVcb2Q=";
# 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; {
description = "A gopsutil-based command to display system usage info";
homepage = "https://github.com/nwg-piotr/gopsuinfo";
license = licenses.bsd2;
maintainers = with maintainers; [ otini ];
2022-08-18 16:33:06 +00:00
platforms = platforms.linux;
2022-08-10 11:44:04 +00:00
};
}