From c83dc8d0505452818fb2913b0e7d469995b08223 Mon Sep 17 00:00:00 2001 From: GGG Date: Sat, 18 Feb 2023 20:33:08 -0300 Subject: [PATCH] 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 --- pkgs/development/libraries/ffmpeg/generic.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index d0374c74901e..402a25d86259 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -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;