rocm-cmake: add update script
This commit is contained in:
parent
52e1574f25
commit
f73811932b
1 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake }:
|
||||
{ lib, stdenv, fetchFromGitHub, writeScript, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rocm-cmake";
|
||||
|
@ -13,6 +13,13 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
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-cmake/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
update-source-version rocm-cmake "$version"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "CMake modules for common build tasks for the ROCm stack";
|
||||
homepage = "https://github.com/RadeonOpenCompute/rocm-cmake";
|
||||
|
|
Loading…
Reference in a new issue