2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-07-27 19:33:50 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, patchelf
|
|
|
|
, cmake
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-07-27 19:33:50 +01:00
|
|
|
|
|
|
|
, intel-gmmlib
|
|
|
|
, intel-graphics-compiler
|
|
|
|
, libva
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "intel-compute-runtime";
|
2020-09-05 03:17:41 +01:00
|
|
|
version = "20.34.17727";
|
2019-07-27 19:33:50 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "intel";
|
|
|
|
repo = "compute-runtime";
|
|
|
|
rev = version;
|
2020-09-05 03:17:41 +01:00
|
|
|
sha256 = "19scbbr6jf3yp2v7z8xyzzm01g44jym7xfkf1dz64d5nhvjw6ig5";
|
2019-07-27 19:33:50 +01:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2019-07-27 19:33:50 +01:00
|
|
|
|
|
|
|
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 = ''
|
2021-01-15 14:45:37 +00:00
|
|
|
patchelf --set-rpath ${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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/intel/compute-runtime";
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "Intel Graphics Compute Runtime for OpenCL. Replaces Beignet for Gen8 (Broadwell) and beyond";
|
2019-07-27 19:33:50 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ gloaming ];
|
|
|
|
};
|
|
|
|
}
|