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:
@@ -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";
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
preCheckHooks+=('setupPoclCheck')
|
||||
preInstallCheckHooks+=('setupPoclCheck')
|
||||
|
||||
setupPoclCheck () {
|
||||
export OCL_ICD_VENDORS="@out@/etc/OpenCL/vendors"
|
||||
}
|
||||
Reference in New Issue
Block a user