2023-11-24 16:57:46 +01:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, libdrm, libX11, libGL, wayland
|
|
|
|
, wayland-protocols, libxkbcommon, libXrandr, libXi, libXcursor }:
|
2023-11-21 02:36:47 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "amdgpu_top";
|
2024-08-18 10:36:21 +02:00
|
|
|
version = "0.9.0";
|
2023-11-21 02:36:47 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Umio-Yasuno";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-08-18 10:36:21 +02:00
|
|
|
hash = "sha256-FUmOoVHDLb86cDA8b9t+wJkUSgY8Lo+abO3F0UBmi+A=";
|
2023-11-21 02:36:47 +01:00
|
|
|
};
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-08-18 10:36:21 +02:00
|
|
|
"libdrm_amdgpu_sys-0.7.4" =
|
|
|
|
"sha256-re38Ci4CnVmVzGwk3uB3htFQZ1j4W6+pXw4NbV26dEU=";
|
2023-11-21 02:36:47 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2023-11-24 16:57:46 +01:00
|
|
|
}
|