Merge pull request #185898 from OlivierNicole/gopsuinfo

gopsuinfo: init at 0.1.1
This commit is contained in:
Guillaume Girol 2022-08-19 15:49:20 +00:00 committed by GitHub
commit b9fc0d76c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,41 @@
{ 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 ];
platforms = platforms.linux;
};
}

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

@ -1449,6 +1449,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 { };