2020-07-18 16:06:22 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, clang
|
|
|
|
, clang-unwrapped
|
|
|
|
, lld
|
|
|
|
, llvm
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rocm-device-libs";
|
2020-11-06 00:33:48 +00:00
|
|
|
version = "3.9.0";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RadeonOpenCompute";
|
|
|
|
repo = "ROCm-Device-Libs";
|
|
|
|
rev = "rocm-${version}";
|
2020-11-06 00:33:48 +00:00
|
|
|
sha256 = "1nil0nhlkszslgvqhim5vmcp3flfafydviq0zk7db8i6z17kq090";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
buildInputs = [ clang lld llvm ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
cmakeBuildType = "Release";
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_PREFIX_PATH=${llvm}/lib/cmake/llvm;${clang-unwrapped}/lib/cmake/clang"
|
|
|
|
"-DLLVM_TARGETS_TO_BUILD='AMDGPU;X86'"
|
|
|
|
"-DCLANG=${clang}/bin/clang"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Set of AMD-specific device-side language runtime libraries";
|
|
|
|
homepage = "https://github.com/RadeonOpenCompute/ROCm-Device-Libs";
|
|
|
|
license = licenses.ncsa;
|
|
|
|
maintainers = with maintainers; [ danieldk ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|