diff --git a/pkgs/development/rocm-modules/default.nix b/pkgs/development/rocm-modules/default.nix index 01077ced8012..b850135a33ff 100644 --- a/pkgs/development/rocm-modules/default.nix +++ b/pkgs/development/rocm-modules/default.nix @@ -88,6 +88,8 @@ let inherit (llvm) clang; }; + rocprof-compute-viewer = self.callPackage ./rocprof-compute-viewer { }; + rocprof-trace-decoder = self.callPackage ./rocprof-trace-decoder { }; roctracer = self.callPackage ./roctracer { }; diff --git a/pkgs/development/rocm-modules/rocprof-compute-viewer/default.nix b/pkgs/development/rocm-modules/rocprof-compute-viewer/default.nix new file mode 100644 index 000000000000..c14f0966840f --- /dev/null +++ b/pkgs/development/rocm-modules/rocprof-compute-viewer/default.nix @@ -0,0 +1,53 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + ninja, + nix-update-script, + qt6, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rocprof-compute-viewer"; + version = "0.1.6"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "rocprof-compute-viewer"; + rev = finalAttrs.version; + hash = "sha256-hjwqU5TxV4p2EjGy5haQfQqItVtYMI7i/VIfrKZvqhE="; + }; + + nativeBuildInputs = [ + cmake + ninja + qt6.wrapQtAppsHook + ]; + + buildInputs = [ + qt6.qtbase + ]; + + # tries to use qt_deploy_runtime_dependencies, but wrapQtAppsHook + # handles that instead + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace-fail 'install(SCRIPT ''${deploy_script})' "" + ''; + + cmakeFlags = [ + (lib.cmakeFeature "QT_VERSION_MAJOR" "6") + (lib.cmakeBool "RCV_DISABLE_OPENGL" true) + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Visualization tool for AMD GPU thread traces from rocprofv3 --att"; + homepage = "https://github.com/ROCm/rocprof-compute-viewer"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + mainProgram = "rocprof-compute-viewer"; + }; +})