Unverified Commit 0e8fd87a authored by Lassulus's avatar Lassulus Committed by GitHub
Browse files

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

amdgpu_top: fix GUI mode missing x11 and wayland libs
parents 3428bdf3 de9e53d9
Loading
Loading
Loading
Loading
+32 −2
Original line number Diff line number Diff line
{ lib, rustPlatform, fetchFromGitHub, libdrm }:
{ lib
, rustPlatform
, fetchFromGitHub
, libdrm
, libX11
, libGL
, wayland
, wayland-protocols
, libxkbcommon
, libXrandr
, libXi
, libXcursor
}:

rustPlatform.buildRustPackage rec {
  pname = "amdgpu_top";
@@ -13,7 +25,25 @@ rustPlatform.buildRustPackage rec {

  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; {
    description = "Tool to display AMDGPU usage";