Added intel-computer-runtime-legacy
This commit is contained in:
parent
e23b49d2c1
commit
bc543061b6
4 changed files with 68 additions and 2 deletions
62
intel-compute-runtime-legacy/default.nix
Normal file
62
intel-compute-runtime-legacy/default.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, intel-gmmlib
|
||||
, intel-graphics-compiler
|
||||
, level-zero
|
||||
, libva
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "intel-compute-runtime-legacy";
|
||||
version = "24.35.30872.32";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "compute-runtime";
|
||||
rev = version;
|
||||
hash = "sha256-POImMopbrhVXuSx2MQ9mwPNKQx7BljyikKhu6M4hZME=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [ intel-gmmlib intel-graphics-compiler libva level-zero ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DSKIP_UNIT_TESTS=1"
|
||||
"-DIGC_DIR=${intel-graphics-compiler}"
|
||||
"-DOCL_ICD_VENDORDIR=${placeholder "out"}/etc/OpenCL/vendors"
|
||||
# The install script assumes this path is relative to CMAKE_INSTALL_PREFIX
|
||||
"-DCMAKE_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.lib ]} \
|
||||
$out/lib/intel-opencl/libigdrcl.so
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Legacy version of Intel Graphics Compute Runtime for OpenCL.";
|
||||
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; [ fleaz ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue