{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , clr , gtest , gbenchmark , buildTests ? false , buildBenchmarks ? false , gpuTargets ? [ ] }: stdenv.mkDerivation (finalAttrs: { pname = "rocrand"; version = "6.0.2"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ]; src = fetchFromGitHub { owner = "ROCm"; repo = "rocRAND"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-BBkcYOP+zh3OQTxuSkeiJizwnE9Gr5Jbhx0e8SU/mmU="; }; 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_