depot/third_party/nixpkgs/pkgs/development/tools/rgp/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

77 lines
1.6 KiB
Nix

{ lib
, stdenv
, makeWrapper
, fetchurl
, autoPatchelfHook
, dbus
, fontconfig
, freetype
, glib
, libGLU
, libglvnd
, libX11
, libxcb
, libXi
, ncurses
, qtbase
, qtdeclarative
, zlib
}:
let
buildNum = "2023-04-25-1075";
in
stdenv.mkDerivation {
pname = "rgp";
version = "1.15";
src = fetchurl {
url = "https://gpuopen.com/download/radeon-developer-tool-suite/RadeonDeveloperToolSuite-${buildNum}.tgz";
hash = "sha256-sk7Z+fmcDsbnYSjf4H4ke2U1pKTh/p4fWRj+f5XX6LQ=";
};
nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
buildInputs = [
dbus
fontconfig
freetype
glib
libGLU
libglvnd
libX11
libxcb
libXi
ncurses
qtbase
qtdeclarative
zlib
];
dontWrapQtApps = true;
installPhase = ''
mkdir -p $out/opt/rgp $out/bin
cp -r . $out/opt/rgp/
chmod +x $out/opt/rgp/scripts/*
patchShebangs $out/opt/rgp/scripts
for prog in RadeonDeveloperPanel RadeonDeveloperService RadeonDeveloperServiceCLI RadeonGPUAnalyzer RadeonGPUProfiler RadeonMemoryVisualizer RadeonRaytracingAnalyzer rga rtda; do
# makeWrapper is needed so that executables are started from the opt
# directory, where qt.conf and other tools are
makeWrapper \
$out/opt/rgp/$prog \
$out/bin/$prog
done
'';
meta = with lib; {
description = "A tool from AMD that allows for deep inspection of GPU workloads";
homepage = "https://gpuopen.com/rgp/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ Flakebi ];
};
}