From c3aa2d2e27f365779fce182b6b70d3cd961bbb3b Mon Sep 17 00:00:00 2001 From: Sebastian Neubauer Date: Wed, 8 Sep 2021 16:14:59 +0200 Subject: [PATCH] rocm-opencl-runtime: add update script --- .../development/libraries/rocm-opencl-runtime/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/rocm-opencl-runtime/default.nix b/pkgs/development/libraries/rocm-opencl-runtime/default.nix index 04fba42525ed..d5e45583c97b 100644 --- a/pkgs/development/libraries/rocm-opencl-runtime/default.nix +++ b/pkgs/development/libraries/rocm-opencl-runtime/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchFromGitHub +, writeScript , addOpenGLRunpath , cmake , rocm-cmake @@ -74,6 +75,13 @@ stdenv.mkDerivation rec { echo 'add_dependencies(amdocl64 OpenCL)' >> amdocl/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-OpenCL-Runtime/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)" + update-source-version rocm-opencl-runtime "$version" + ''; + meta = with lib; { description = "OpenCL runtime for AMD GPUs, part of the ROCm stack"; homepage = "https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime";