My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/development/libraries/rocm-runtime/default.nix

51 lines
1.0 KiB

{ stdenv
, lib
, fetchFromGitHub
, addOpenGLRunpath
, clang-unwrapped
, cmake
, xxd
, elfutils
, llvm
, numactl
, rocm-device-libs
, rocm-thunk }:
stdenv.mkDerivation rec {
pname = "rocm-runtime";
version = "4.3.1";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "ROCR-Runtime";
rev = "rocm-${version}";
hash = "sha256-B67v9B8LXDbWNxYNRxM3dgFFLjFSyJmm0zd3G5Bgvek=";
};
sourceRoot = "source/src";
nativeBuildInputs = [ cmake xxd ];
buildInputs = [ clang-unwrapped elfutils llvm numactl ];
cmakeFlags = [
"-DBITCODE_DIR=${rocm-device-libs}/amdgcn/bitcode"
"-DCMAKE_PREFIX_PATH=${rocm-thunk}"
];
postPatch = ''
patchShebangs image/blit_src/create_hsaco_ascii_file.sh
'';
fixupPhase = ''
rm -rf $out/hsa
'';
meta = with lib; {
description = "Platform runtime for ROCm";
homepage = "https://github.com/RadeonOpenCompute/ROCR-Runtime";
license = with licenses; [ ncsa ];
maintainers = with maintainers; [ danieldk lovesegfault ];
};
}