mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 01:03:25 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
63 lines
1.7 KiB
Nix
63 lines
1.7 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, intel-gmmlib
|
|
, intel-graphics-compiler
|
|
, level-zero
|
|
, libva
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "intel-compute-runtime";
|
|
version = "24.39.31294.12";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "intel";
|
|
repo = "compute-runtime";
|
|
rev = version;
|
|
hash = "sha256-7GNtAo20DgxAxYSPt6Nh92nuuaS9tzsQGH+sLnsvBKU=";
|
|
};
|
|
|
|
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 ]} \
|
|
$out/lib/intel-opencl/libigdrcl.so
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Intel Graphics Compute Runtime for OpenCL. Replaces Beignet for Gen8 (Broadwell) and beyond";
|
|
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 ];
|
|
};
|
|
}
|