{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-smi , rocm-runtime , libcap , grpc , protobuf , openssl , doxygen , graphviz , texliveSmall , gtest , buildDocs ? true , buildTests ? false }: 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 = "rdc"; version = "6.0.2"; outputs = [ "out" ] ++ lib.optionals buildDocs [ "doc" ] ++ lib.optionals buildTests [ "test" ]; src = fetchFromGitHub { owner = "ROCm"; repo = "rdc"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-QugcajxILmDeQiWG5uAUO41Wut45irg2Ynufgn1bmps="; }; nativeBuildInputs = [ cmake protobuf ] ++ lib.optionals buildDocs [ doxygen graphviz latex ]; buildInputs = [ rocm-smi rocm-runtime libcap grpc openssl ] ++ lib.optionals buildTests [ gtest ]; cmakeFlags = [ "-DCMAKE_VERBOSE_MAKEFILE=OFF" "-DRDC_INSTALL_PREFIX=${placeholder "out"}" "-DBUILD_ROCRTEST=ON" "-DRSMI_INC_DIR=${rocm-smi}/include" "-DRSMI_LIB_DIR=${rocm-smi}/lib" "-DGRPC_ROOT=${grpc}" # Manually define CMAKE_INSTALL_