1
0
Fork 1
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:
Sebastian Neubauer 2021-09-08 16:14:08 +02:00
parent 52e1574f25
commit f73811932b

View file

@ -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";