diff --git a/pkgs/tools/system/rocm-smi/default.nix b/pkgs/tools/system/rocm-smi/default.nix index bbee315e9c70..52b75b7a4e9e 100644 --- a/pkgs/tools/system/rocm-smi/default.nix +++ b/pkgs/tools/system/rocm-smi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, wrapPython }: +{ lib, stdenv, fetchFromGitHub, writeScript, cmake, wrapPython }: stdenv.mkDerivation rec { pname = "rocm-smi"; @@ -42,9 +42,16 @@ stdenv.mkDerivation rec { wrapPythonProgramsIn $out/bin ''; + passthru.updateScript = writeScript "update.sh" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl jq common-updater-scripts + version="$(curl -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" + ''; + meta = with lib; { description = "System management interface for AMD GPUs supported by ROCm"; - homepage = "https://github.com/RadeonOpenCompute/ROC-smi"; + homepage = "https://github.com/RadeonOpenCompute/rocm_smi_lib"; license = with licenses; [ mit ]; maintainers = with maintainers; [ lovesegfault ]; platforms = [ "x86_64-linux" ];