pocl: add setupHook to specifies directory to scan for ICDs

Adds a setup hook that sets the OCL_ICD_VENDORS environment variable
to point to a directory containing ICD (Installable Client Driver) files.

These files define the available OpenCL backends, allowing other OpenCL
applications to detect and use the appropriate drivers in sandbox environment.
This commit is contained in:
qbisi
2025-04-21 09:27:34 +05:30
committed by Masum Reza
parent d60250f164
commit 072302cf6b
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -80,6 +80,8 @@ stdenv.mkDerivation (finalAttrs: {
passthru.updateScript = nix-update-script { };
setupHook = ./setup-hook.sh;
meta = {
description = "A portable open source (MIT-licensed) implementation of the OpenCL standard";
homepage = "http://portablecl.org";
+6
View File
@@ -0,0 +1,6 @@
preCheckHooks+=('setupPoclCheck')
preInstallCheckHooks+=('setupPoclCheck')
setupPoclCheck () {
export OCL_ICD_VENDORS="@out@/etc/OpenCL/vendors"
}