{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , rocm-runtime , rocm-device-libs , rocm-comgr , rocprim , hip , gtest , buildTests ? false , buildBenchmarks ? false }: stdenv.mkDerivation (finalAttrs: { pname = "rocthrust"; version = "5.4.0"; # Comment out these outputs until tests/benchmarks are fixed (upstream?) # outputs = [ # "out" # ] ++ lib.optionals buildTests [ # "test" # ] ++ lib.optionals buildBenchmarks [ # "benchmark" # ]; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "rocThrust"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-3OcJUL6T1HJz6TQb1//lumsTxqfwbWbQ4lGuZoKmqbY="; }; nativeBuildInputs = [ cmake rocm-cmake rocprim hip ]; buildInputs = [ rocm-runtime rocm-device-libs rocm-comgr ] ++ lib.optionals buildTests [ gtest ]; cmakeFlags = [ "-DCMAKE_CXX_COMPILER=hipcc" "-DHIP_ROOT_DIR=${hip}" # Manually define CMAKE_INSTALL_