rocm-smi: add update script and fix url
This commit is contained in:
parent
4e89f2a609
commit
52e1574f25
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, cmake, wrapPython }:
|
{ lib, stdenv, fetchFromGitHub, writeScript, cmake, wrapPython }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "rocm-smi";
|
pname = "rocm-smi";
|
||||||
@ -42,9 +42,16 @@ stdenv.mkDerivation rec {
|
|||||||
wrapPythonProgramsIn $out/bin
|
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; {
|
meta = with lib; {
|
||||||
description = "System management interface for AMD GPUs supported by ROCm";
|
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 ];
|
license = with licenses; [ mit ];
|
||||||
maintainers = with maintainers; [ lovesegfault ];
|
maintainers = with maintainers; [ lovesegfault ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
|
Loading…
Reference in New Issue
Block a user