{ lib, stdenv, fetchFromGitHub, rocmUpdateScript, cmake, rocm-cmake, rocm-runtime, busybox, python3, gnugrep, }: stdenv.mkDerivation (finalAttrs: { version = "7.1.1"; pname = "rocminfo"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocminfo"; rev = "rocm-${finalAttrs.version}"; sha256 = "sha256-SuW34m2ep69+dj1rb0vqfQcK83FBtjlMLqSMCUZltU4="; }; 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 = { description = "ROCm Application for Reporting System Info"; homepage = "https://github.com/ROCm/rocminfo"; license = lib.licenses.ncsa; mainProgram = "rocminfo"; maintainers = with lib.maintainers; [ lovesegfault ]; teams = [ lib.teams.rocm ]; platforms = lib.platforms.linux; }; })