Merge pull request #229793 from lelgenio/fix-amdgpu_top-gui-mode

amdgpu_top: fix GUI mode missing x11 and wayland libs
This commit is contained in:
Lassulus 2023-05-04 10:29:16 +02:00 committed by GitHub
commit 0e8fd87a9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,16 @@
{ lib, rustPlatform, fetchFromGitHub, libdrm }: { lib
, rustPlatform
, fetchFromGitHub
, libdrm
, libX11
, libGL
, wayland
, wayland-protocols
, libxkbcommon
, libXrandr
, libXi
, libXcursor
}:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "amdgpu_top"; pname = "amdgpu_top";
@ -13,7 +25,25 @@ rustPlatform.buildRustPackage rec {
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = ./Cargo.lock;
buildInputs = [ libdrm ]; buildInputs = [
libdrm
libX11
libGL
wayland
wayland-protocols
libxkbcommon
libXrandr
libXi
libXcursor
];
postInstall = ''
install -D ./assets/${pname}.desktop -t $out/share/applications/
'';
postFixup = ''
patchelf --set-rpath "${lib.makeLibraryPath buildInputs}" $out/bin/${pname}
'';
meta = with lib; { meta = with lib; {
description = "Tool to display AMDGPU usage"; description = "Tool to display AMDGPU usage";