about summary refs log tree commit diff
path: root/pkgs/development/libraries/hipcub
diff options
context:
space:
mode:
authorMadoura <madouura@gmail.com>2022-11-28 05:53:23 -0600
committerMadoura <madouura@gmail.com>2022-11-28 05:59:50 -0600
commit30a6bef0266576857c3597f8aac19326bfee4983 (patch)
treea5e93065c766c552900db88dafb86c68faa1c997 /pkgs/development/libraries/hipcub
parent78c7e665d4d3f83cdd7fd444099f2851f463dee7 (diff)
rocm-related: deprecate rocmVersion and repoVersion
clang-ocl: deprecate rocmVersion and repoVersion

hipcub: deprecate rocmVersion and repoVersion

hipsparse: deprecate rocmVersion and repoVersion

miopen: deprecate rocmVersion and repoVersion

miopengemm: deprecate rocmVersion and repoVersion

rccl: deprecate rocmVersion and repoVersion

rocblas: deprecate rocmVersion and repoVersion

rocfft: deprecate rocmVersion and repoVersion

rocmlir: deprecate rocmVersion and repoVersion

rocprim: deprecate rocmVersion and repoVersion

rocrand: deprecate rocmVersion and repoVersion

rocsparse: deprecate rocmVersion and repoVersion

rocthrust: deprecate rocmVersion and repoVersion

rocwmma: deprecate rocmVersion and repoVersion

tensile: deprecate rocmVersion and repoVersion
Diffstat (limited to 'pkgs/development/libraries/hipcub')
-rw-r--r--pkgs/development/libraries/hipcub/default.nix16
1 files changed, 6 insertions, 10 deletions
diff --git a/pkgs/development/libraries/hipcub/default.nix b/pkgs/development/libraries/hipcub/default.nix
index 29310be853680..651f5ccc5b598 100644
--- a/pkgs/development/libraries/hipcub/default.nix
+++ b/pkgs/development/libraries/hipcub/default.nix
@@ -18,9 +18,7 @@
 # CUB can also be used as a backend instead of rocPRIM.
 stdenv.mkDerivation (finalAttrs: {
   pname = "hipcub";
-  repoVersion = "2.12.0";
-  rocmVersion = "5.3.3";
-  version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
+  version = "5.3.3";
 
   outputs = [
     "out"
@@ -33,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: {
   src = fetchFromGitHub {
     owner = "ROCmSoftwarePlatform";
     repo = "hipCUB";
-    rev = "rocm-${finalAttrs.rocmVersion}";
+    rev = "rocm-${finalAttrs.version}";
     hash = "sha256-/GMZKbMD1sZQCM2FulM9jiJQ8ByYZinn0C8d/deFh0g=";
   };
 
@@ -81,11 +79,9 @@ stdenv.mkDerivation (finalAttrs: {
   passthru.updateScript = writeScript "update.sh" ''
     #!/usr/bin/env nix-shell
     #!nix-shell -i bash -p curl jq common-updater-scripts
-    json="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -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
+    version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
+      -sL "https://api.github.com/repos/ROCmSoftwarePlatform/hipCUB/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
+    update-source-version hipcub "$version" --ignore-same-hash
   '';
 
   meta = with lib; {
@@ -93,6 +89,6 @@ stdenv.mkDerivation (finalAttrs: {
     homepage = "https://github.com/ROCmSoftwarePlatform/hipCUB";
     license = with licenses; [ bsd3 ];
     maintainers = teams.rocm.members;
-    broken = finalAttrs.rocmVersion != hip.version;
+    broken = finalAttrs.version != hip.version;
   };
 })