{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , hip , gtest , gbenchmark , buildTests ? false , buildBenchmarks ? false }: stdenv.mkDerivation (finalAttrs: { pname = "rocprim"; version = "5.4.3"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ]; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "rocPRIM"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-Sqr3lbDMK1Gwucqmr/CHoxw/L6bGj3wlXoHzKTnTqoc="; }; nativeBuildInputs = [ cmake rocm-cmake hip ]; buildInputs = lib.optionals buildTests [ gtest ] ++ lib.optionals buildBenchmarks [ gbenchmark ]; cmakeFlags = [ "-DCMAKE_CXX_COMPILER=hipcc" # Manually define CMAKE_INSTALL_