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