Added intel-computer-runtime-legacy

This commit is contained in:
fleaz 2024-12-28 16:47:31 +01:00
parent e23b49d2c1
commit bc543061b6
No known key found for this signature in database
GPG key ID: AED15F8FDD04D083
4 changed files with 68 additions and 2 deletions

View file

@ -22,6 +22,7 @@ self: super: {
netrw-nvim = super.callPackage ./netrw-nvim { }; netrw-nvim = super.callPackage ./netrw-nvim { };
}); });
salt-lint = super.callPackage ./salt-lint { }; salt-lint = super.callPackage ./salt-lint { };
intel-compute-runtime-legacy = super.callPackage ./intel-compute-runtime-legacy { };
nerdfonts = super.nerdfonts.override { nerdfonts = super.nerdfonts.override {
fonts = [ fonts = [

View file

@ -45,6 +45,7 @@
netrw-nvim = prev.callPackage ./netrw-nvim { }; netrw-nvim = prev.callPackage ./netrw-nvim { };
}); });
salt-lint = prev.callPackage ./salt-lint { }; salt-lint = prev.callPackage ./salt-lint { };
intel-compute-runtime-legacy = prev.callPackage ./intel-compute-runtime-legacy { };
}; };
}; };
} }

View 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 ];
};
}

View file

@ -1,9 +1,11 @@
{ pkgs ? import <nixpkgs> { overlays = [ (import ./default.nix) ]; } }: { pkgs ? import <nixpkgs> { overlays = [ (import ./default.nix) ]; } }:
let
# mypython = pkgs.python3.withPackages (python-pkgs: [ # mypython = pkgs.python3.withPackages (python-pkgs: [
# python-pkgs.salt-lint # python-pkgs.dilithium
# ]); # ]);
in
pkgs.mkShell { pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
salt-lint intel-compute-runtime-legacy
]; ];
} }