{ lib, stdenv, fetchFromGitHub, rocmUpdateScript, cmake, rocm-cmake, rocprim, clr, gtest, buildTests ? false, buildBenchmarks ? false, gpuTargets ? [ ], }: stdenv.mkDerivation (finalAttrs: { pname = "rocthrust"; version = "6.3.3"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ]; src = fetchFromGitHub { owner = "ROCm"; repo = "rocThrust"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-c1+hqP/LipaQ2/lPJo79YBd9H0n0Y7yHkxe0/INE14s="; }; nativeBuildInputs = [ cmake rocm-cmake rocprim clr ]; buildInputs = lib.optionals buildTests [ gtest ]; cmakeFlags = [ "-DHIP_ROOT_DIR=${clr}" # Manually define CMAKE_INSTALL_