From 40372cd0d9f6f8eb64e8596481a7f7504fa8d14c Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 5 Sep 2025 13:01:11 +0200 Subject: [PATCH] Fix amd-uprof dependencies with patchelf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Aleix Boné --- pkgs/amd-uprof/default.nix | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/pkgs/amd-uprof/default.nix b/pkgs/amd-uprof/default.nix index 08633ca..7d2fd86 100644 --- a/pkgs/amd-uprof/default.nix +++ b/pkgs/amd-uprof/default.nix @@ -3,6 +3,19 @@ , curl , cacert , runCommandLocal +, autoPatchelfHook +, elfutils +, glib +, libGL +, ncurses5 +, xorg +, zlib +, libxkbcommon +, freetype +, fontconfig +, libGLU +, dbus +, rocmPackages }: let @@ -31,11 +44,36 @@ in src = uprofSrc; dontStrip = true; phases = [ "installPhase" "fixupPhase" ]; + nativeBuildInputs = [ autoPatchelfHook ]; + buildInputs = [ + stdenv.cc.cc.lib + ncurses5 + elfutils + glib + libGL + libGLU + xorg.libX11 + xorg.libXext + xorg.libXi + xorg.libXmu + xorg.libxcb + xorg.xcbutilwm + xorg.xcbutilrenderutil + xorg.xcbutilkeysyms + xorg.xcbutilimage + fontconfig.lib + libxkbcommon + zlib + freetype + dbus + rocmPackages.rocprofiler + ]; installPhase = '' set -x mkdir -p $out tar -x -v -C $out --strip-components=1 -f $src rm $out/bin/AMDPowerProfilerDriverSource.tar.gz + patchelf --replace-needed libroctracer64.so.1 libroctracer64.so $out/bin/ProfileAgents/x64/libAMDGpuAgent.so set +x ''; }