rocm-runtime: add update script

This commit is contained in:
Sebastian Neubauer 2021-09-08 16:14:49 +02:00
parent ea2a723c00
commit 315631dfe3

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, writeScript
, addOpenGLRunpath
, clang-unwrapped
, cmake
@ -41,6 +42,13 @@ stdenv.mkDerivation rec {
rm -rf $out/hsa
'';
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/ROCR-Runtime/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version rocm-runtime "$version"
'';
meta = with lib; {
description = "Platform runtime for ROCm";
homepage = "https://github.com/RadeonOpenCompute/ROCR-Runtime";