3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/rocm-runtime/default.nix

49 lines
1,000 B
Nix
Raw Normal View History

{ stdenv
, fetchFromGitHub
, addOpenGLRunpath
2020-08-21 07:40:30 +01:00
, clang-unwrapped
, cmake
2020-08-21 07:40:30 +01:00
, xxd
, elfutils
2020-08-21 07:40:30 +01:00
, llvm
, rocm-device-libs
, rocm-thunk }:
2020-07-10 16:08:10 +01:00
stdenv.mkDerivation rec {
pname = "rocm-runtime";
2020-11-03 06:53:32 +00:00
version = "3.9.0";
2020-07-10 16:08:10 +01:00
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "ROCR-Runtime";
rev = "rocm-${version}";
2020-11-03 06:53:32 +00:00
sha256 = "034qbqznfligg4lwd95zmqa7lwcda720zbfv066nqvarlcml0kr6";
2020-07-10 16:08:10 +01:00
};
sourceRoot = "source/src";
2020-08-21 07:40:30 +01:00
nativeBuildInputs = [ cmake xxd ];
2020-07-10 16:08:10 +01:00
2020-08-21 07:40:30 +01:00
buildInputs = [ clang-unwrapped elfutils llvm ];
2020-07-10 16:08:10 +01:00
2020-08-21 07:40:30 +01:00
cmakeFlags = [
2020-11-03 06:53:32 +00:00
"-DBITCODE_DIR=${rocm-device-libs}/amdgcn/bitcode"
2020-08-21 07:40:30 +01:00
"-DCMAKE_PREFIX_PATH=${rocm-thunk}"
];
postPatch = ''
patchShebangs image/blit_src/create_hsaco_ascii_file.sh
2020-07-10 16:08:10 +01:00
'';
fixupPhase = ''
2020-08-21 07:40:30 +01:00
rm -rf $out/hsa
2020-07-10 16:08:10 +01:00
'';
meta = with stdenv.lib; {
description = "Platform runtime for ROCm";
homepage = "https://github.com/RadeonOpenCompute/ROCR-Runtime";
license = with licenses; [ ncsa ];
maintainers = with maintainers; [ danieldk ];
};
}