nixpkgs/pkgs/tools/system/rocm-smi/default.nix
Madoura 3ced8179cd
rocm-related: optional GITHUB_TOKEN for update script
hip: optional GITHUB_TOKEN for update script

rocm-llvm: optional GITHUB_TOKEN for update script

clang-ocl: optional GITHUB_TOKEN for update script

hipcub: optional GITHUB_TOKEN for update script

hipsparse: optional GITHUB_TOKEN for update script

miopen: optional GITHUB_TOKEN for update script

miopengemm: optional GITHUB_TOKEN for update script

rccl: optional GITHUB_TOKEN for update script

rocblas: optional GITHUB_TOKEN for update script

rocclr: optional GITHUB_TOKEN for update script

rocfft: optional GITHUB_TOKEN for update script

rocm-comgr: optional GITHUB_TOKEN for update script

rocm-device-libs: optional GITHUB_TOKEN for update script

rocm-opencl-runtime: optional GITHUB_TOKEN for update script

rocm-runtime: optional GITHUB_TOKEN for update script

rocm-thunk: optional GITHUB_TOKEN for update script

rocmlir: optional GITHUB_TOKEN for update script

rocprim: optional GITHUB_TOKEN for update script

rocrand: optional GITHUB_TOKEN for update script

rocsparse: optional GITHUB_TOKEN for update script

rocthrust: optional GITHUB_TOKEN for update script

rocwmma: optional GITHUB_TOKEN for update script

tensile: optional GITHUB_TOKEN for update script

rocm-cmake: optional GITHUB_TOKEN for update script

rocminfo: optional GITHUB_TOKEN for update script

rocm-smi: optional GITHUB_TOKEN for update script
2022-11-28 02:25:56 -06:00

37 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, writeScript, cmake, wrapPython }:
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-smi";
version = "5.3.3";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "rocm_smi_lib";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-UbGbkH2vhQ9gv3sSoG+mXap+MdcrP61TN5DcP5F/5nQ=";
};
nativeBuildInputs = [ cmake wrapPython ];
patches = [ ./cmake.patch ];
postInstall = ''
wrapPythonProgramsIn $out
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/rocm_smi_lib/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version rocm-smi "$version" --ignore-same-hash
'';
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" ];
};
})