2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libdrm
|
|
|
|
, libX11
|
|
|
|
, libGL
|
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
|
|
|
, libxkbcommon
|
|
|
|
, libXrandr
|
|
|
|
, libXi
|
|
|
|
, libXcursor
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "amdgpu_top";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.1.9";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Umio-Yasuno";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-RR+YK8LyrPz7Pfv8moSOPei+56088lhoz8HxoB6+0B8=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
|
|
|
|
|
|
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";
|
|
|
|
homepage = "https://github.com/Umio-Yasuno/amdgpu_top";
|
|
|
|
changelog = "https://github.com/Umio-Yasuno/amdgpu_top/releases";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ geri1701 ];
|
|
|
|
};
|
|
|
|
}
|