rocm-comgr: add update script

This commit is contained in:
Sebastian Neubauer 2021-09-08 16:15:25 +02:00
parent 1ab7362a4e
commit d99dfe5821

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, clang, rocm-device-libs, lld, llvm }:
{ lib, stdenv, fetchFromGitHub, writeScript, cmake, clang, rocm-device-libs, lld, llvm }:
stdenv.mkDerivation rec {
pname = "rocm-comgr";
@ -36,6 +36,13 @@ stdenv.mkDerivation rec {
-i CMakeLists.txt
'';
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-CompilerSupport/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version rocm-comgr "$version"
'';
meta = with lib; {
description = "APIs for compiling and inspecting AMDGPU code objects";
homepage = "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/tree/amd-stg-open/lib/comgr";