File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
pkgs/development/python-modules/rembg Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 3333
3434 # tests
3535 versionCheckHook ,
36+ pocl ,
3637
3738 withCli ? false ,
39+ config ,
40+ cudaSupport ? config . cudaSupport ,
41+ writableTmpDirAsHomeHook ,
3842} :
3943
4044let
@@ -100,9 +104,17 @@ buildPythonPackage (finalAttrs: {
100104 postInstall = lib . optionalString ( ! withCli ) "rm -r $out/bin" ;
101105
102106 # not running python tests, as they require network access
103- nativeCheckInputs = lib . optionals withCli [
104- versionCheckHook
105- ] ;
107+ nativeCheckInputs =
108+ lib . optionals withCli [
109+ versionCheckHook
110+ ]
111+ ++ lib . optionals cudaSupport [
112+ # Provides a CPU-based OpenCL ICD so that pyopencl's module-level
113+ # cl.create_some_context() succeeds without GPU hardware.
114+ pocl
115+ # pocl needs a writable $HOME for its kernel cache directory.
116+ writableTmpDirAsHomeHook
117+ ] ;
106118 versionCheckKeepEnvironment = [
107119 # Otherwise, fail with:
108120 # RuntimeError: cannot cache function '_make_tree': no locator available for file
You can’t perform that action at this time.
0 commit comments