{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , hip , gfortran , rocblas , rocsolver , gtest , lapack-reference , buildTests ? false , buildBenchmarks ? false , buildSamples ? false }: # Can also use cuBLAS stdenv.mkDerivation (finalAttrs: { pname = "hipblas"; version = "5.4.3"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ] ++ lib.optionals buildSamples [ "sample" ]; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "hipBLAS"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-mSZCq8UaiffMzWVflW1nAX6CQZ1DqwWJaSIzKslZSEk="; }; nativeBuildInputs = [ cmake rocm-cmake hip 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_