mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
darktable: fix OpenCL support
The OpenCL compiler does not properly support -I flags to include the kernel paths, breaking relative includes. Simply replace the included files by absolute paths. OpenCL kernels verified to compile and work on an RX 580. Credits for the fix go to nixos-rocm.
This commit is contained in:
parent
6faba433b2
commit
0aef146cdd
@ -43,6 +43,10 @@ stdenv.mkDerivation rec {
|
||||
libPathEnvVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
|
||||
libPathPrefix = "$out/lib/darktable" + stdenv.lib.optionalString stdenv.isLinux ":${ocl-icd}/lib";
|
||||
in ''
|
||||
for f in $out/share/darktable/kernels/*.cl; do
|
||||
sed -r "s|#include \"(.*)\"|#include \"$out/share/darktable/kernels/\1\"|g" -i "$f"
|
||||
done
|
||||
|
||||
gappsWrapperArgs+=(
|
||||
--prefix ${libPathEnvVar} ":" "${libPathPrefix}"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user