{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , hip , python3 , tensile , msgpack , libxml2 , gtest , gfortran , openmp , amd-blis , python3Packages , buildTensile ? true , buildTests ? false , buildBenchmarks ? false , tensileLogic ? "asm_full" , tensileCOVersion ? "V3" , tensileSepArch ? true , tensileLazyLib ? true , tensileLibFormat ? "msgpack" , gpuTargets ? [ "all" ] }: stdenv.mkDerivation (finalAttrs: { pname = "rocblas"; version = "5.4.3"; outputs = [ "out" ] ++ lib.optionals buildTests [ "test" ] ++ lib.optionals buildBenchmarks [ "benchmark" ]; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "rocBLAS"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-XhYpzBXviMnUdbF6lZi9g0LARKpzWLtDxJxLI3MuHiM="; }; nativeBuildInputs = [ cmake rocm-cmake hip ]; buildInputs = [ python3 ] ++ lib.optionals buildTensile [ msgpack libxml2 python3Packages.msgpack ] ++ lib.optionals buildTests [ gtest ] ++ lib.optionals (buildTests || buildBenchmarks) [ gfortran openmp amd-blis ] ++ lib.optionals (buildTensile || buildTests || buildBenchmarks) [ python3Packages.pyyaml ]; cmakeFlags = [ "-DCMAKE_C_COMPILER=hipcc" "-DCMAKE_CXX_COMPILER=hipcc" "-Dpython=python3" "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" "-DBUILD_WITH_TENSILE=${if buildTensile then "ON" else "OFF"}" # Manually define CMAKE_INSTALL_