{ lib, stdenv, fetchFromGitHub, rocmUpdateScript, cmake, rocm-cmake, rocm-runtime, busybox, python3, gnugrep, }: stdenv.mkDerivation (finalAttrs: { version = "6.4.3"; pname = "rocminfo"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocminfo"; rev = "rocm-${finalAttrs.version}"; sha256 = "sha256-YscZ5sFsLOVBg98w2X6vTzniTvl9NfCkIE+HAH6vv5Y="; }; strictDeps = true; nativeBuildInputs = [ cmake rocm-cmake python3 ]; buildInputs = [ rocm-runtime ]; cmakeFlags = [ "-DROCRTST_BLD_TYPE=Release" ]; prePatch = '' patchShebangs rocm_agent_enumerator sed 's,lsmod | grep ,${busybox}/bin/lsmod | ${gnugrep}/bin/grep ,' -i rocminfo.cc ''; passthru.updateScript = rocmUpdateScript { name = finalAttrs.pname; inherit (finalAttrs.src) owner; inherit (finalAttrs.src) repo; }; meta = with lib; { description = "ROCm Application for Reporting System Info"; homepage = "https://github.com/ROCm/rocminfo"; license = licenses.ncsa; mainProgram = "rocminfo"; maintainers = with maintainers; [ lovesegfault ]; teams = [ teams.rocm ]; platforms = platforms.linux; }; })