{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , rocm-runtime , rocm-device-libs , rocm-comgr , rocm-smi , hip , gtest , chrpath , buildTests ? false }: stdenv.mkDerivation (finalAttrs: { pname = "rccl"; version = "5.4.0"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ]; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "rccl"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-NbHzRmrUe4kJwkHZtZ+zHjIy2uk+dpN9caE0L5hUnbc="; }; nativeBuildInputs = [ cmake rocm-cmake hip ]; buildInputs = [ rocm-runtime rocm-device-libs rocm-comgr rocm-smi gtest ] ++ lib.optionals buildTests [ chrpath ]; cmakeFlags = [ "-DCMAKE_C_COMPILER=hipcc" "-DCMAKE_CXX_COMPILER=hipcc" # Manually define CMAKE_INSTALL_