Change:
, current version: 20.34. desired version: 21.42. maintainers: The packages version is quite old and doesn't work properly on 11th gen cpus. There are also other PR which are interwoven with this such as: And also an issue that might be related To update this properly I think we need to update at least the following packages: , , and .

Discussion:
, runCommandLocal , bison , flex <del> , llvmPackages_8 </del> <ins> , llvmPackages_11 , lld_11 </ins> , opencl-clang , python3 , spirv-llvm-translator

}: let <del> llvmPkgs = llvmPackages_8 // { </del> <ins> vc_intrinsics_src = fetchFromGitHub { owner = "intel"; repo = "vc-intrinsics"; rev = "e5ad7e02aa4aa21a3cd7b3e5d1f3ec9b95f58872"; sha256 = "Vg1mngwpIQ3Tik0GgRXPG22lE4sLEAEFch492G2aIXs="; }; llvmPkgs = llvmPackages_11 // { </ins> inherit spirv-llvm-translator; }; inherit (llvmPkgs) llvm;

stdenv.mkDerivation rec { pname = "intel-graphics-compiler"; <del> version = "1.0.4241"; </del> <ins> version = "1.0.8744"; </ins> src = fetchFromGitHub { owner = "intel"; repo = "intel-graphics-compiler"; rev = "igc-${version}"; <del> sha256 = "1jp3c67ppl1x4pazr5nzy52615cpx0kyckaridhc0fsmrkgilyxq"; </del> <ins> sha256 = "G5+dYD8uZDPkRyn1sgXsRngdq4NJndiCJCYTRXyUgTA="; </ins> }; nativeBuildInputs = [ clang cmake bison flex python3 ]; <del> buildInputs = [ clang opencl-clang spirv-llvm-translator llvm ]; </del> <ins> buildInputs = [ clang opencl-clang spirv-llvm-translator llvm lld_11 ]; </ins> strictDeps = true;

ln -s clang $out/clang-${versions.major (getVersion clang)} ln -s ${opencl-clang}/lib/* $out/ ln -s ${lib.getLib libclang}/lib/clang/${getVersion clang}/include/opencl-c.h $out/ <ins> ln -s ${lib.getLib libclang}/lib/clang/${getVersion clang}/include/opencl-c-base.h $out/ </ins> ''; cmakeFlags = [ <ins> "-DVC_INTRINSICS_SRC=${vc_intrinsics_src}" "-DINSTALL_SPIRVDLL=0" </ins> "-DCCLANG_BUILD_PREBUILDS=ON" "-DCCLANG_BUILD_PREBUILDS_DIR=${prebuilds}" "-DIGC_PREFERRED_LLVM_VERSION=${getVersion llvm}"

, fetchFromGitHub , cmake , pkg-config , lit <del> , llvm_8 </del> <ins> , llvm_11 </ins> }: stdenv.mkDerivation rec { pname = "SPIRV-LLVM-Translator"; <del> version = "8.0.1-2"; </del> <ins> version = "unstable-2021-06-13"; </ins> src = fetchFromGitHub { owner = "KhronosGroup"; repo = "SPIRV-LLVM-Translator"; <del> rev = "v${version}"; sha256 = "0hxalc3fkliqs61hpr97phbm3qsx4b8vgnlg30aimzr6aas403r5"; </del> <ins> rev = "c67e6f26a7285aa753598ef792593ac4a545adf9"; sha256 = "sha256-1s3lVNTQDl+pUvbzSMsp3cOUSm6I4DzqJxnLMeeE3F4="; </ins> }; <del> nativeBuildInputs = [ pkg-config cmake llvm_8.dev ]; </del> <ins> nativeBuildInputs = [ pkg-config cmake llvm_11.dev ]; </ins> <del> buildInputs = [ llvm_8 ]; </del> <ins> buildInputs = [ llvm_11 ]; </ins> checkInputs = [ lit ]; <del> cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=ON" ]; </del> <ins> cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=ON" ]; </ins> # FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist doCheck = false;

, cmake , git <del> , llvmPackages_8 </del> <ins> , llvmPackages_11 </ins> , spirv-llvm-translator , buildWithPatches ? true }: let <del> llvmPkgs = llvmPackages_8 // { </del> <ins> llvmPkgs = llvmPackages_11 // { </ins> inherit spirv-llvm-translator; };

}); passthru = rec { <ins> spirv-llvm-translator = llvmPkgs.spirv-llvm-translator; llvm = addPatches "llvm" llvmPkgs.llvm; </ins> libclang = addPatches "clang" llvmPkgs.libclang; clang-unwrapped = libclang.out;

patchesOut = stdenv.mkDerivation rec { pname = "opencl-clang-patches"; inherit (library) version src patches; <ins> # Clang patches assume the root is the llvm root dir # but clang root in nixpkgs is the clang sub-directory postPatch = '' for filename in patches/clang/*.patch; do substituteInPlace "$filename"  --replace "a/clang/" "a/"  --replace "b/clang/" "b/" done ''; </ins> installPhase = '' [ -d patches ] && cp -r patches/ $out || mkdir $out <del> mkdir -p $out/clang $out/spirv </del> <ins> mkdir -p $out/clang $out/llvm </ins> ''; }; <del> spirv-llvm-translator = addPatches "spirv" llvmPkgs.spirv-llvm-translator; </del> }; library = let

in stdenv.mkDerivation rec { pname = "opencl-clang"; <del> version = "unstable-2019-08-16"; </del> <ins> version = "unstable-2021-06-22"; </ins> inherit passthru; src = fetchFromGitHub { owner = "intel"; repo = "opencl-clang"; <del> rev = "94af090661d7c953c516c97a25ed053c744a0737"; sha256 = "05cg89m62nqjqm705h7gpdz4jd4hiczg8944dcjsvaybrqv3hcm5"; </del> <ins> rev = "fd68f64b33e67d58f6c36b9e25c31c1178a1962a"; sha256 = "sha256-q1YPBb/LY67iEuQx1fMUQD/I7OsNfobW3yNfJxLXx3E="; </ins> }; patches = [

stdenv.mkDerivation rec { pname = "intel-compute-runtime"; <del> version = "20.34.17727"; </del> <ins> version = "21.42.21270"; </ins> src = fetchFromGitHub { owner = "intel"; repo = "compute-runtime"; rev = version; <del> sha256 = "19scbbr6jf3yp2v7z8xyzzm01g44jym7xfkf1dz64d5nhvjw6ig5"; </del> <ins> sha256 = "N9MsDcsL8kBWxfZjhukcxZiSJnXxqMgWF0etOhf2/AE="; </ins> }; nativeBuildInputs = [ cmake pkg-config ];