at 23.05-pre 54 lines 1.4 kB view raw
1{ lib, stdenv 2, fetchFromGitHub 3, patchelf 4, cmake 5, pkg-config 6 7, intel-gmmlib 8, intel-graphics-compiler 9, libva 10}: 11 12stdenv.mkDerivation rec { 13 pname = "intel-compute-runtime"; 14 version = "22.35.24055"; 15 16 src = fetchFromGitHub { 17 owner = "intel"; 18 repo = "compute-runtime"; 19 rev = version; 20 sha256 = "sha256-MOWlhzhEGYyHGk6N+H7O2BLho4YFyvcCbj/zafhzLEw="; 21 }; 22 23 nativeBuildInputs = [ cmake pkg-config ]; 24 25 buildInputs = [ intel-gmmlib intel-graphics-compiler libva ]; 26 27 cmakeFlags = [ 28 "-DSKIP_UNIT_TESTS=1" 29 30 "-DIGC_DIR=${intel-graphics-compiler}" 31 "-DOCL_ICD_VENDORDIR=${placeholder "out"}/etc/OpenCL/vendors" 32 33 # The install script assumes this path is relative to CMAKE_INSTALL_PREFIX 34 "-DCMAKE_INSTALL_LIBDIR=lib" 35 ]; 36 37 postInstall = '' 38 # Avoid clash with intel-ocl 39 mv $out/etc/OpenCL/vendors/intel.icd $out/etc/OpenCL/vendors/intel-neo.icd 40 ''; 41 42 postFixup = '' 43 patchelf --set-rpath ${lib.makeLibraryPath [ intel-gmmlib intel-graphics-compiler libva stdenv.cc.cc.lib ]} \ 44 $out/lib/intel-opencl/libigdrcl.so 45 ''; 46 47 meta = with lib; { 48 homepage = "https://github.com/intel/compute-runtime"; 49 description = "Intel Graphics Compute Runtime for OpenCL. Replaces Beignet for Gen8 (Broadwell) and beyond"; 50 license = licenses.mit; 51 platforms = platforms.linux; 52 maintainers = with maintainers; [ gloaming ]; 53 }; 54}