diff --git a/default.nix b/default.nix index 881cfb5..c4f6167 100644 --- a/default.nix +++ b/default.nix @@ -22,7 +22,7 @@ self: super: { netrw-nvim = super.callPackage ./netrw-nvim { }; }); salt-lint = super.callPackage ./salt-lint { }; - intel-compute-runtime-legacy = super.callPackage ./intel-compute-runtime-legacy { }; + intel-compute-runtime-legacy1 = super.callPackage ./intel-compute-runtime-legacy1 { }; nerdfonts = super.nerdfonts.override { fonts = [ diff --git a/flake.nix b/flake.nix index a64d340..29cf2c1 100644 --- a/flake.nix +++ b/flake.nix @@ -45,7 +45,7 @@ netrw-nvim = prev.callPackage ./netrw-nvim { }; }); salt-lint = prev.callPackage ./salt-lint { }; - intel-compute-runtime-legacy = prev.callPackage ./intel-compute-runtime-legacy { }; + intel-compute-runtime-legacy1 = prev.callPackage ./intel-compute-runtime-legacy1 { }; }; }; } diff --git a/intel-compute-runtime-legacy/default.nix b/intel-compute-runtime-legacy1/default.nix similarity index 51% rename from intel-compute-runtime-legacy/default.nix rename to intel-compute-runtime-legacy1/default.nix index 262d7a3..d72718b 100644 --- a/intel-compute-runtime-legacy/default.nix +++ b/intel-compute-runtime-legacy1/default.nix @@ -1,17 +1,23 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, pkg-config -, intel-gmmlib -, intel-graphics-compiler -, level-zero -, libva +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + pkg-config, + intel-gmmlib, + intel-graphics-compiler, + level-zero, + libva, + gitUpdater, }: +let + inherit (lib) cmakeBool; +in stdenv.mkDerivation rec { - pname = "intel-compute-runtime-legacy"; - version = "24.35.30872.32"; + # https://github.com/intel/compute-runtime/blob/master/LEGACY_PLATFORMS.md + pname = "intel-compute-runtime-legacy1"; + version = "24.35.30872.32"; # 24.35.30872.x is the last series to support Gen8, Gen9 and Gen11 GPU support src = fetchFromGitHub { owner = "intel"; @@ -20,9 +26,17 @@ stdenv.mkDerivation rec { hash = "sha256-POImMopbrhVXuSx2MQ9mwPNKQx7BljyikKhu6M4hZME="; }; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ + cmake + pkg-config + ]; - buildInputs = [ intel-gmmlib intel-graphics-compiler libva level-zero ]; + buildInputs = [ + intel-gmmlib + intel-graphics-compiler + libva + level-zero + ]; cmakeFlags = [ "-DSKIP_UNIT_TESTS=1" @@ -30,9 +44,13 @@ stdenv.mkDerivation rec { "-DOCL_ICD_VENDORDIR=${placeholder "out"}/etc/OpenCL/vendors" # The install script assumes this path is relative to CMAKE_INSTALL_PREFIX "-DCMAKE_INSTALL_LIBDIR=lib" + (cmakeBool "NEO_LEGACY_PLATFORMS_SUPPORT" true) ]; - outputs = [ "out" "drivers" ]; + outputs = [ + "out" + "drivers" + ]; # causes redefinition of _FORTIFY_SOURCE hardeningDisable = [ "fortify3" ]; @@ -46,17 +64,28 @@ stdenv.mkDerivation rec { ''; postFixup = '' - patchelf --set-rpath ${lib.makeLibraryPath [ intel-gmmlib intel-graphics-compiler libva stdenv.cc.cc.lib ]} \ + patchelf --set-rpath ${ + lib.makeLibraryPath [ + intel-gmmlib + intel-graphics-compiler + libva + stdenv.cc.cc + ] + } \ $out/lib/intel-opencl/libigdrcl.so ''; + passthru.updateScript = gitUpdater { + rev-prefix = "24.35.30872."; + }; + meta = with lib; { - description = "Legacy version of Intel Graphics Compute Runtime for OpenCL."; + description = "Intel Graphics Compute Runtime for OpenCL with support for Gen8, Gen9 and Gen11 GPUs.d"; 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" ]; + platforms = [ "x86_64-linux" ]; maintainers = with maintainers; [ fleaz ]; }; } diff --git a/test.nix b/test.nix index dc261dd..a488943 100644 --- a/test.nix +++ b/test.nix @@ -6,6 +6,6 @@ let in pkgs.mkShell { buildInputs = with pkgs; [ - intel-compute-runtime-legacy + intel-compute-runtime-legacy1 ]; }