2020-07-10 18:29:23 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, clang
|
|
|
|
, clang-unwrapped
|
|
|
|
, lld
|
|
|
|
, llvm
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rocm-device-libs";
|
2020-12-18 07:23:50 +00:00
|
|
|
version = "4.0.0";
|
2020-07-10 18:29:23 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RadeonOpenCompute";
|
|
|
|
repo = "ROCm-Device-Libs";
|
|
|
|
rev = "rocm-${version}";
|
2020-11-30 18:23:01 +00:00
|
|
|
hash = "sha256-IAE8T/gmotXO/ADH3bxTjrpxWd2lRoj3o/rrSaEFNNo=";
|
2020-07-10 18:29:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2020-08-15 06:59:31 +01:00
|
|
|
buildInputs = [ clang lld llvm ];
|
2020-07-10 18:29:23 +01: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;
|
|
|
|
};
|
|
|
|
}
|