2022-12-04 01:25:41 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rocmUpdateScript
|
|
|
|
, cmake
|
|
|
|
, wrapPython
|
|
|
|
}:
|
2020-07-17 08:07:09 +02:00
|
|
|
|
2022-11-24 03:17:04 +01:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-07-17 08:07:09 +02:00
|
|
|
pname = "rocm-smi";
|
2022-12-04 01:26:46 +01:00
|
|
|
version = "5.4.0";
|
2020-07-17 08:07:09 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RadeonOpenCompute";
|
2021-03-24 10:04:45 +01:00
|
|
|
repo = "rocm_smi_lib";
|
2022-11-24 03:17:04 +01:00
|
|
|
rev = "rocm-${finalAttrs.version}";
|
2022-12-04 01:26:46 +01:00
|
|
|
hash = "sha256-nkidiDNNU6MGhne9EbYClkODJZw/zZu3LWzlniJKyJE=";
|
2020-07-17 08:07:09 +02:00
|
|
|
};
|
|
|
|
|
2021-09-02 22:03:18 +02:00
|
|
|
nativeBuildInputs = [ cmake wrapPython ];
|
2020-07-17 08:07:09 +02:00
|
|
|
|
2022-10-05 12:36:21 +02:00
|
|
|
patches = [ ./cmake.patch ];
|
2021-03-24 10:04:45 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2022-09-26 09:02:03 +02:00
|
|
|
wrapPythonProgramsIn $out
|
2020-07-17 08:07:09 +02:00
|
|
|
'';
|
|
|
|
|
2022-12-04 01:25:41 +01:00
|
|
|
passthru.updateScript = rocmUpdateScript {
|
|
|
|
name = finalAttrs.pname;
|
|
|
|
owner = finalAttrs.src.owner;
|
|
|
|
repo = finalAttrs.src.repo;
|
|
|
|
};
|
2021-09-08 15:04:31 +02:00
|
|
|
|
2020-07-17 08:07:09 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "System management interface for AMD GPUs supported by ROCm";
|
2021-09-08 15:04:31 +02:00
|
|
|
homepage = "https://github.com/RadeonOpenCompute/rocm_smi_lib";
|
2020-07-17 08:07:09 +02:00
|
|
|
license = with licenses; [ mit ];
|
2022-11-24 02:29:33 +01:00
|
|
|
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
|
2021-03-24 10:04:45 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2020-07-17 08:07:09 +02:00
|
|
|
};
|
2022-11-24 03:17:04 +01:00
|
|
|
})
|