From 1ab7362a4e1c3176a1a6a5fec8c0ab1c9541e767 Mon Sep 17 00:00:00 2001 From: Sebastian Neubauer Date: Wed, 8 Sep 2021 16:15:14 +0200 Subject: [PATCH] rocm-device-libs: add update script --- pkgs/development/libraries/rocm-device-libs/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/rocm-device-libs/default.nix b/pkgs/development/libraries/rocm-device-libs/default.nix index 77dd4b721f2a..e32331486569 100644 --- a/pkgs/development/libraries/rocm-device-libs/default.nix +++ b/pkgs/development/libraries/rocm-device-libs/default.nix @@ -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";