{ lib, stdenv, fetchFromGitHub, rocmUpdateScript, cmake, rocm-cmake, rocprim, clr, gtest, buildTests ? false, buildBenchmarks ? false, gpuTargets ? clr.localGpuTargets or [ ], }: stdenv.mkDerivation (finalAttrs: { pname = "rocthrust"; version = "7.1.1"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ]; src = fetchFromGitHub { owner = "ROCm"; repo = "rocThrust"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-Gncy0wvN8M4JSmnjbxaED+M9rLo4A/7LCCq/6temiZU="; }; nativeBuildInputs = [ cmake rocm-cmake rocprim clr ]; buildInputs = lib.optionals buildTests [ gtest ]; cmakeFlags = [ "-DHIP_ROOT_DIR=${clr}" # Manually define CMAKE_INSTALL_