blob: c5aab60d33bc80cfc0a6975bb179169e62a38076 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
intel-gmmlib,
intel-graphics-compiler,
level-zero,
libva,
}:
stdenv.mkDerivation rec {
pname = "intel-compute-runtime";
version = "25.09.32961.7";
src = fetchFromGitHub {
owner = "intel";
repo = "compute-runtime";
tag = version;
hash = "sha256-Rdy6ACGclhBn8bulHdjHuLzaGO2jj04iDGoXeHgl6Hs=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
intel-gmmlib
intel-graphics-compiler
libva
level-zero
];
cmakeFlags = [
(lib.cmakeBool "SKIP_UNIT_TESTS" true)
(lib.cmakeFeature "IGC_DIR" (builtins.toString intel-graphics-compiler))
(lib.cmakeFeature "OCL_ICD_VENDORDIR" "${placeholder "out"}/etc/OpenCL/vendors")
# The install script assumes this path is relative to CMAKE_INSTALL_PREFIX
(lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
];
outputs = [
"out"
"drivers"
];
# causes redefinition of _FORTIFY_SOURCE
hardeningDisable = [ "fortify3" ];
postInstall = ''
# Avoid clash with intel-ocl
mv $out/etc/OpenCL/vendors/intel.icd $out/etc/OpenCL/vendors/intel-neo.icd
mkdir -p $drivers/lib
mv -t $drivers/lib $out/lib/libze_intel*
'';
postFixup = ''
patchelf --set-rpath ${
lib.makeLibraryPath [
intel-gmmlib
intel-graphics-compiler
libva
stdenv.cc.cc
]
} \
$out/lib/intel-opencl/libigdrcl.so
'';
meta = with lib; {
description = "Intel Graphics Compute Runtime oneAPI Level Zero and OpenCL, supporting 12th Gen and newer";
mainProgram = "ocloc";
homepage = "https://github.com/intel/compute-runtime";
changelog = "https://github.com/intel/compute-runtime/releases/tag/${version}";
license = licenses.mit;
platforms = [
"x86_64-linux"
"aarch64-linux"
];
maintainers = with maintainers; [ SuperSandro2000 ];
};
}
|