ffmpeg: fix RUNPATH patching

ffmpeg was having issues while trying to use the nvenc encodings due to
not finding libcuda.so.1

this was because addOpenGLRunpath was pointing to $out/lib instead of
using the placeholder path of the lib output

Co-authored-by: Mats <mats@mats.sh>
This commit is contained in:
GGG 2023-02-18 20:33:08 -03:00
parent ea64ad20e3
commit c83dc8d050

View file

@ -653,9 +653,9 @@ stdenv.mkDerivation (finalAttrs: {
# Set RUNPATH so that libnvcuvid and libcuda in /run/opengl-driver(-32)/lib can be found.
# See the explanation in addOpenGLRunpath.
postFixup = optionalString stdenv.isLinux ''
addOpenGLRunpath $out/lib/libavcodec.so
addOpenGLRunpath $out/lib/libavutil.so
postFixup = optionalString (stdenv.isLinux && withLib) ''
addOpenGLRunpath ${placeholder "lib"}/lib/libavcodec.so
addOpenGLRunpath ${placeholder "lib"}/lib/libavutil.so
'';
enableParallelBuilding = true;