{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , clr , gtest , gbenchmark , buildTests ? false , buildBenchmarks ? false , gpuTargets ? [ ] }: stdenv.mkDerivation (finalAttrs: { pname = "rocrand"; version = "5.7.1"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ]; src = fetchFromGitHub { owner = "ROCm"; repo = "rocRAND"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-VrpiHlZZQH+IOoaEDuDOfRgnMiqm1bpRIuNyrPz2SGY="; fetchSubmodules = true; # For inline hipRAND }; nativeBuildInputs = [ cmake rocm-cmake clr ]; buildInputs = lib.optionals buildTests [ gtest ] ++ lib.optionals buildBenchmarks [ gbenchmark ]; cmakeFlags = [ "-DCMAKE_C_COMPILER=hipcc" "-DCMAKE_CXX_COMPILER=hipcc" "-DHIP_ROOT_DIR=${clr}" # Manually define CMAKE_INSTALL_