rocm-device-libs: add update script

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

View file

@ -1,5 +1,6 @@
{ lib, stdenv
, fetchFromGitHub
, writeScript
, cmake
, clang
, clang-unwrapped
@ -30,6 +31,13 @@ stdenv.mkDerivation rec {
"-DCLANG=${clang}/bin/clang"
];
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-Device-Libs/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version rocm-device-libs "$version"
'';
meta = with lib; {
description = "Set of AMD-specific device-side language runtime libraries";
homepage = "https://github.com/RadeonOpenCompute/ROCm-Device-Libs";