nixpkgs/pkgs/by-name/in/intel-compute-runtime/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

85 lines
1.8 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.45.31740.9";
src = fetchFromGitHub {
owner = "intel";
repo = "compute-runtime";
rev = version;
hash = "sha256-b7mHIet+zgbS0JfJLKvt9+xILWeuA2rvTAeXetlFz/w=";
};
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 ];
};
}