{ lib , stdenv , fetchFromGitHub , rocmUpdateScript , cmake , rocm-cmake , gfortran }: stdenv.mkDerivation (finalAttrs: { pname = "hipfort"; version = "5.4.2"; src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "hipfort"; rev = "rocm-${finalAttrs.version}"; hash = "sha256-cXzNOvWIU388AU5hzLwmIGaX5DvzIJJCvgkP2BA4jao="; }; nativeBuildInputs = [ cmake rocm-cmake gfortran ]; cmakeFlags = [ "-DHIPFORT_COMPILER=${gfortran}/bin/gfortran" "-DHIPFORT_AR=${gfortran.cc}/bin/gcc-ar" "-DHIPFORT_RANLIB=${gfortran.cc}/bin/gcc-ranlib" # Manually define CMAKE_INSTALL_