9 stdenv.mkDerivation rec {
10 pname = "rocm-device-libs";
13 src = fetchFromGitHub {
14 owner = "RadeonOpenCompute";
15 repo = "ROCm-Device-Libs";
16 rev = "rocm-${version}";
17 hash = "sha256-rKMe0B/pkDek/ZU37trnJNa8aqvlwxobPb1+VTx/bJU=";
20 nativeBuildInputs = [ cmake ];
22 buildInputs = [ clang llvm ];
25 "-DCMAKE_PREFIX_PATH=${llvm}/lib/cmake/llvm;${llvm}/lib/cmake/clang"
26 "-DLLVM_TARGETS_TO_BUILD='AMDGPU;X86'"
27 "-DCLANG=${clang}/bin/clang"
30 patches = [ ./cmake.patch ];
32 passthru.updateScript = writeScript "update.sh" ''
33 #!/usr/bin/env nix-shell
34 #!nix-shell -i bash -p curl jq common-updater-scripts
35 version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/ROCm-Device-Libs/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
36 update-source-version rocm-device-libs "$version"
40 description = "Set of AMD-specific device-side language runtime libraries";
41 homepage = "https://github.com/RadeonOpenCompute/ROCm-Device-Libs";
42 license = licenses.ncsa;
43 maintainers = with maintainers; [ lovesegfault Flakebi ];
44 platforms = platforms.linux;