nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 makeWrapper,
5 fetchurl,
6 autoPatchelfHook,
7 dbus,
8 directx-shader-compiler,
9 fontconfig,
10 freetype,
11 glib,
12 libdrm,
13 libGLU,
14 libglvnd,
15 libICE,
16 libkrb5,
17 libSM,
18 libX11,
19 libxcb,
20 libXi,
21 libxkbcommon,
22 libxml2_13,
23 ncurses,
24 wayland,
25 xcbutil,
26 zlib,
27 zstd,
28}:
29
30let
31 buildNum = "2025-12-08-1746";
32in
33stdenv.mkDerivation {
34 pname = "rgp";
35 version = "2.6.1";
36
37 src = fetchurl {
38 url = "https://gpuopen.com/download/RadeonDeveloperToolSuite-${buildNum}.tgz";
39 hash = "sha256-rfFZPA8DzgP5axSHToEBvhRTgWAejn/z0WlLMectya0=";
40 };
41
42 nativeBuildInputs = [
43 makeWrapper
44 autoPatchelfHook
45 ];
46
47 buildInputs = [
48 dbus
49 directx-shader-compiler
50 fontconfig
51 freetype
52 glib
53 libdrm
54 libGLU
55 libglvnd
56 libICE
57 libkrb5
58 libSM
59 libX11
60 libxcb
61 libXi
62 libxkbcommon
63 libxml2_13
64 ncurses
65 wayland
66 xcbutil
67 zlib
68 zstd
69 ];
70
71 installPhase = ''
72 mkdir -p $out/opt/rgp $out/bin
73 cp -r . $out/opt/rgp/
74
75 chmod +x $out/opt/rgp/scripts/*
76 patchShebangs $out/opt/rgp/scripts
77
78 for prog in RadeonDeveloperPanel RadeonDeveloperService RadeonDeveloperServiceCLI RadeonGPUAnalyzer RadeonGPUProfiler RadeonMemoryVisualizer RadeonRaytracingAnalyzer rga rtda; do
79 # makeWrapper is needed so that executables are started from the opt
80 # directory, where qt.conf and other tools are.
81 # Unset Qt theme, it does not work if the nixos Qt version is different from the packaged one.
82 makeWrapper \
83 $out/opt/rgp/$prog \
84 $out/bin/$prog \
85 --unset QT_QPA_PLATFORMTHEME \
86 --unset QT_STYLE_OVERRIDE \
87 --prefix LD_LIBRARY_PATH : $out/opt/rgp/lib
88 done
89 '';
90
91 meta = {
92 description = "Tool from AMD that allows for deep inspection of GPU workloads";
93 homepage = "https://gpuopen.com/rgp/";
94 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
95 license = lib.licenses.unfree;
96 platforms = [ "x86_64-linux" ];
97 maintainers = with lib.maintainers; [ Flakebi ];
98 };
99}