8 , page ? "releases/latest"
9 , filter ? ".tag_name | split(\"-\") | .[1]"
14 if lib.hasPrefix "rocm-llvm-" name
15 then "llvm.${lib.removePrefix "rocm-llvm-" name}"
18 updateScript = writeScript "update.sh" ''
19 #!/usr/bin/env nix-shell
20 #!nix-shell -i bash -p curl jq common-updater-scripts
21 version="$(curl ''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
22 -sL "https://api.github.com/repos/${owner}/${repo}/${page}" | jq '${filter}' --raw-output)"
24 IFS='.' read -a version_arr <<< "$version"
26 if (( ''${version_arr[0]} > 5 )); then
27 echo "'rocmPackages_5.${pname}' is already at it's maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${pname}'." 1>&2
31 if [ "''${#version_arr[*]}" == 2 ]; then
32 version="''${version}.0"
35 update-source-version rocmPackages_5.${pname} "$version" --ignore-same-hash