{ lib, stdenv, fetchFromGitHub, rocmUpdateScript, cmake, rocm-cmake, clr, gtest, gbenchmark, buildTests ? false, buildBenchmarks ? false, gpuTargets ? [ ], }: stdenv.mkDerivation (finalAttrs: { pname = "rocprim"; version = "6.3.3"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ]; src = fetchFromGitHub { owner = "ROCm"; repo = "rocPRIM"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-0aHxpBuYIYhI2UER45YhHHL5YcxA+XeXoihcUs2AmCo="; }; nativeBuildInputs = [ cmake rocm-cmake clr ]; buildInputs = lib.optionals buildTests [ gtest ] ++ lib.optionals buildBenchmarks [ gbenchmark ]; cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" # Manually define CMAKE_INSTALL_