diff options
author | Madoura <madouura@gmail.com> | 2022-11-22 08:13:49 -0600 |
---|---|---|
committer | Madoura <madouura@gmail.com> | 2022-11-23 20:27:26 -0600 |
commit | a80fa825e617e53dae7a00e97ea6d75caea3fa11 (patch) | |
tree | 31806d9a0225171ff319b0c3e53b397a44d09515 /pkgs/development/libraries/hipcub | |
parent | 878cb61054ad018729171107120e282ab7051adc (diff) |
rocm-related: add update script
rocprim: add update script hipcub: add update script rocsparse: add update script hipsparse: add update script rccl: add update script rocfft: add update script tensile: add update script rocblas: add update script miopengemm: add update script clang-ocl: add update script rocthrust: add update script rocmlir: add update script
Diffstat (limited to 'pkgs/development/libraries/hipcub')
-rw-r--r-- | pkgs/development/libraries/hipcub/default.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/development/libraries/hipcub/default.nix b/pkgs/development/libraries/hipcub/default.nix index facb890a3eb7c..d6b322efe41ff 100644 --- a/pkgs/development/libraries/hipcub/default.nix +++ b/pkgs/development/libraries/hipcub/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, writeScript , cmake , rocm-cmake , rocm-runtime @@ -20,8 +21,9 @@ assert buildBenchmarks -> gbenchmark != null; # CUB can also be used as a backend instead of rocPRIM. stdenv.mkDerivation rec { pname = "hipcub"; + repoVersion = "2.12.0"; rocmVersion = "5.3.1"; - version = "2.12.0-${rocmVersion}"; + version = "${repoVersion}-${rocmVersion}"; outputs = [ "out" @@ -79,6 +81,16 @@ stdenv.mkDerivation rec { rmdir $out/bin ''; + passthru.updateScript = writeScript "update.sh" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl jq common-updater-scripts + json="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/hipCUB/releases?per_page=1")" + repoVersion="$(echo "$json" | jq '.[0].name | split(" ") | .[1]' --raw-output)" + rocmVersion="$(echo "$json" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)" + update-source-version hipcub "$repoVersion" --ignore-same-hash --version-key=repoVersion + update-source-version hipcub "$rocmVersion" --ignore-same-hash --version-key=rocmVersion + ''; + meta = with lib; { description = "Thin wrapper library on top of rocPRIM or CUB"; homepage = "https://github.com/ROCmSoftwarePlatform/hipCUB"; |