diff options
Diffstat (limited to 'pkgs/development/libraries/hipcub/default.nix')
-rw-r--r-- | pkgs/development/libraries/hipcub/default.nix | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/pkgs/development/libraries/hipcub/default.nix b/pkgs/development/libraries/hipcub/default.nix index facb890a3eb7c..651f5ccc5b598 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 @@ -8,20 +9,16 @@ , rocm-comgr , rocprim , hip -, gtest ? null -, gbenchmark ? null +, gtest +, gbenchmark , buildTests ? false , buildBenchmarks ? false }: -assert buildTests -> gtest != null; -assert buildBenchmarks -> gbenchmark != null; - # CUB can also be used as a backend instead of rocPRIM. -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "hipcub"; - rocmVersion = "5.3.1"; - version = "2.12.0-${rocmVersion}"; + version = "5.3.3"; outputs = [ "out" @@ -34,7 +31,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "hipCUB"; - rev = "rocm-${rocmVersion}"; + rev = "rocm-${finalAttrs.version}"; hash = "sha256-/GMZKbMD1sZQCM2FulM9jiJQ8ByYZinn0C8d/deFh0g="; }; @@ -79,11 +76,19 @@ 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 + 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; { description = "Thin wrapper library on top of rocPRIM or CUB"; homepage = "https://github.com/ROCmSoftwarePlatform/hipCUB"; license = with licenses; [ bsd3 ]; - maintainers = with maintainers; [ Madouura ]; - broken = rocmVersion != hip.version; + maintainers = teams.rocm.members; + broken = finalAttrs.version != hip.version; }; -} +}) |