12 if stdenv.hostPlatform.isx86_64 then "X86"
13 else if stdenv.hostPlatform.isAarch64 then "AArch64"
14 else throw "Unsupported ROCm LLVM platform";
15 in stdenv.mkDerivation (finalAttrs: {
16 pname = "rocm-device-libs";
19 src = fetchFromGitHub {
21 repo = "ROCm-Device-Libs";
22 rev = "rocm-${finalAttrs.version}";
23 hash = "sha256-ARxs/yqyVoIUWliJkINzitumF+64/5u3fbB0tHB5hPU=";
26 patches = [ ./cmake.patch ];
33 buildInputs = [ libxml2 ];
34 cmakeFlags = [ "-DLLVM_TARGETS_TO_BUILD=AMDGPU;${llvmNativeTarget}" ];
36 passthru.updateScript = rocmUpdateScript {
37 name = finalAttrs.pname;
38 owner = finalAttrs.src.owner;
39 repo = finalAttrs.src.repo;
43 description = "Set of AMD-specific device-side language runtime libraries";
44 homepage = "https://github.com/ROCm/ROCm-Device-Libs";
45 license = licenses.ncsa;
46 maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
47 platforms = platforms.linux;
48 broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "6.0.0";