3ced8179cd
hip: optional GITHUB_TOKEN for update script rocm-llvm: optional GITHUB_TOKEN for update script clang-ocl: optional GITHUB_TOKEN for update script hipcub: optional GITHUB_TOKEN for update script hipsparse: optional GITHUB_TOKEN for update script miopen: optional GITHUB_TOKEN for update script miopengemm: optional GITHUB_TOKEN for update script rccl: optional GITHUB_TOKEN for update script rocblas: optional GITHUB_TOKEN for update script rocclr: optional GITHUB_TOKEN for update script rocfft: optional GITHUB_TOKEN for update script rocm-comgr: optional GITHUB_TOKEN for update script rocm-device-libs: optional GITHUB_TOKEN for update script rocm-opencl-runtime: optional GITHUB_TOKEN for update script rocm-runtime: optional GITHUB_TOKEN for update script rocm-thunk: optional GITHUB_TOKEN for update script rocmlir: optional GITHUB_TOKEN for update script rocprim: optional GITHUB_TOKEN for update script rocrand: optional GITHUB_TOKEN for update script rocsparse: optional GITHUB_TOKEN for update script rocthrust: optional GITHUB_TOKEN for update script rocwmma: optional GITHUB_TOKEN for update script tensile: optional GITHUB_TOKEN for update script rocm-cmake: optional GITHUB_TOKEN for update script rocminfo: optional GITHUB_TOKEN for update script rocm-smi: optional GITHUB_TOKEN for update script
30 lines
1 KiB
Nix
30 lines
1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, writeScript, cmake }:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "rocm-cmake";
|
|
version = "5.3.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "RadeonOpenCompute";
|
|
repo = "rocm-cmake";
|
|
rev = "rocm-${finalAttrs.version}";
|
|
hash = "sha256-AOn3SLprHdeo2FwojQdhRAttUHuaWkO6WlymK8Q8lbc=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
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/RadeonOpenCompute/rocm-cmake/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
|
update-source-version rocm-cmake "$version" --ignore-same-hash
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "CMake modules for common build tasks for the ROCm stack";
|
|
homepage = "https://github.com/RadeonOpenCompute/rocm-cmake";
|
|
license = licenses.mit;
|
|
maintainers = teams.rocm.members;
|
|
platforms = platforms.unix;
|
|
};
|
|
})
|