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