{ 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 = "5.7.1"; 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-abaEZN82dsoEC5gIF3/6epRDVz5ItUo6CkZsybu/G+g="; }; 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_