{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , clr , gfortran , rocblas , rocsolver , gtest , lapack-reference , buildTests ? false , buildBenchmarks ? false , buildSamples ? false }: # Can also use cuBLAS stdenv.mkDerivation (finalAttrs: { pname = "hipblas"; version = "6.0.2"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ] ++ lib.optionals buildSamples [ "sample" ]; src = fetchFromGitHub { owner = "ROCm"; repo = "hipBLAS"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-Fq7o2sMmHlHIv9UKJw+u/h9K/ZhKVJWwosYTdYIsscA="; }; nativeBuildInputs = [ cmake rocm-cmake clr gfortran ]; buildInputs = [ rocblas rocsolver ] ++ lib.optionals buildTests [ gtest ] ++ lib.optionals (buildTests || buildBenchmarks) [ lapack-reference ]; cmakeFlags = [ "-DCMAKE_C_COMPILER=hipcc" "-DCMAKE_CXX_COMPILER=hipcc" # Manually define CMAKE_INSTALL_