gopsuinfo: init at 0.1.1

This commit is contained in:
Olivier Nicole 2022-08-10 13:44:04 +02:00
parent 67bad8a821
commit 6a6de26531
3 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,40 @@
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "gopsuinfo";
version = "0.1.1";
src = fetchFromGitHub {
owner = "nwg-piotr";
repo = "gopsuinfo";
rev = "v${version}";
sha256 = "sha256-lEc5k89L0ViihcbYh6I5m+Z6Q/rhLFGwftc3WD2EJ/M=";
};
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 ];
};
}

View File

@ -0,0 +1,12 @@
diff --git a/Makefile b/Makefile
index d33866c..e0aafb4 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,6 @@ install:
mkdir -p "${DESTDIR}/usr/share/gopsuinfo" "${DESTDIR}/usr/bin"
cp -R icons_light "${DESTDIR}/usr/share/gopsuinfo"
cp -R icons_dark "${DESTDIR}/usr/share/gopsuinfo"
- cp bin/gopsuinfo "${DESTDIR}/usr/bin/"
uninstall:
rm -r "${DESTDIR}/usr/share/gopsuinfo"

View File

@ -1432,6 +1432,8 @@ with pkgs;
goldberg-emu = callPackage ../applications/emulators/goldberg-emu { };
gopsuinfo = callPackage ../tools/system/gopsuinfo { };
gxemul = callPackage ../applications/emulators/gxemul { };
hatari = callPackage ../applications/emulators/hatari { };