2019-07-27 19:33:50 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, patchelf
|
|
|
|
, cmake
|
|
|
|
, pkgconfig
|
|
|
|
|
|
|
|
, intel-gmmlib
|
|
|
|
, intel-graphics-compiler
|
|
|
|
, libva
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "intel-compute-runtime";
|
2020-08-20 19:09:11 +01:00
|
|
|
version = "20.33.17675";
|
2019-07-27 19:33:50 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "intel";
|
|
|
|
repo = "compute-runtime";
|
|
|
|
rev = version;
|
2020-08-20 19:09:11 +01:00
|
|
|
sha256 = "1ckzspf05skdrjh947gv96finxbv5dpgc84hppm5pdsp5q70iyxp";
|
2019-07-27 19:33:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
|
|
|
|
buildInputs = [ intel-gmmlib intel-graphics-compiler libva ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DSKIP_UNIT_TESTS=1"
|
|
|
|
|
|
|
|
"-DIGC_DIR=${intel-graphics-compiler}"
|
2020-08-20 19:09:11 +01:00
|
|
|
"-DOCL_ICD_VENDORDIR=${placeholder "out"}/etc/OpenCL/vendors"
|
2019-07-27 19:33:50 +01:00
|
|
|
|
|
|
|
# The install script assumes this path is relative to CMAKE_INSTALL_PREFIX
|
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# Avoid clash with intel-ocl
|
|
|
|
mv $out/etc/OpenCL/vendors/intel.icd $out/etc/OpenCL/vendors/intel-neo.icd
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2020-08-11 12:29:02 +01:00
|
|
|
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ intel-gmmlib intel-graphics-compiler libva stdenv.cc.cc.lib ]} \
|
2019-07-27 19:33:50 +01:00
|
|
|
$out/lib/intel-opencl/libigdrcl.so
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/intel/compute-runtime";
|
2019-07-27 19:33:50 +01:00
|
|
|
description = "Intel Graphics Compute Runtime for OpenCL. Replaces Beignet for Gen8 (Broadwell) and beyond.";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ gloaming ];
|
|
|
|
};
|
|
|
|
}
|