nixpkgs/pkgs/tools/system/rocm-smi/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, rocmUpdateScript
, cmake
, wrapPython
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-smi";
2023-03-29 09:56:49 +00:00
version = "5.4.4";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "rocm_smi_lib";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-nkidiDNNU6MGhne9EbYClkODJZw/zZu3LWzlniJKyJE=";
};
postPatch = ''
sed '1i#include <cstring>' -i src/rocm_smi{,_gpu_metrics}.cc # since gcc12 probably
'';
2021-09-02 20:03:18 +00:00
nativeBuildInputs = [ cmake wrapPython ];
2022-10-05 10:36:21 +00:00
patches = [ ./cmake.patch ];
postInstall = ''
2022-09-26 07:02:03 +00:00
wrapPythonProgramsIn $out
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "System management interface for AMD GPUs supported by ROCm";
homepage = "https://github.com/RadeonOpenCompute/rocm_smi_lib";
license = with licenses; [ mit ];
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = [ "x86_64-linux" ];
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
};
})