{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , git , rocm-comgr , rocm-runtime , hwdata , texliveSmall , doxygen , graphviz , buildDocs ? true }: let latex = lib.optionalAttrs buildDocs (texliveSmall.withPackages (ps: with ps; [ changepage latexmk varwidth multirow hanging adjustbox collectbox stackengine enumitem alphalph wasysym sectsty tocloft newunicodechar etoc helvetic wasy courier ])); in stdenv.mkDerivation (finalAttrs: { pname = "rocdbgapi"; version = "6.0.2"; outputs = [ "out" ] ++ lib.optionals buildDocs [ "doc" ]; src = fetchFromGitHub { owner = "ROCm"; repo = "ROCdbgapi"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-+CxaTmxRt/RicqQddqIEHs8vvAPCMKXkWg7kbZvnUsQ="; }; nativeBuildInputs = [ cmake rocm-cmake git ] ++ lib.optionals buildDocs [ latex doxygen graphviz ]; buildInputs = [ rocm-comgr rocm-runtime hwdata ]; cmakeFlags = [ "-DPCI_IDS_PATH=${hwdata}/share/hwdata" # Manually define CMAKE_INSTALL_