mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 23:20:55 +00:00
rocm-cmake: add update script
This commit is contained in:
parent
52e1574f25
commit
f73811932b
|
@ -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