{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , hip , gtest , gbenchmark , buildTests ? false , buildBenchmarks ? false }: stdenv.mkDerivation (finalAttrs: { pname = "rocrand"; version = "5.4.3"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ]; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "rocRAND"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-xK1JRTW+7odlXRQV9WC6ZfXqRKow/TQ9grHCigw+/us="; fetchSubmodules = true; # For inline hipRAND }; nativeBuildInputs = [ cmake rocm-cmake hip ]; buildInputs = lib.optionals buildTests [ gtest ] ++ lib.optionals buildBenchmarks [ gbenchmark ]; cmakeFlags = [ "-DCMAKE_C_COMPILER=hipcc" "-DCMAKE_CXX_COMPILER=hipcc" "-DHIP_ROOT_DIR=${hip}" # Manually define CMAKE_INSTALL_