From 96638775aa8fbca76ad6a88ffd52f1b076ae24d1 Mon Sep 17 00:00:00 2001 From: Enno Lohmeier Date: Mon, 11 May 2020 11:09:45 +0200 Subject: ffmpeg-full: setup addOpenGLRunpath --- pkgs/development/libraries/ffmpeg-full/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix index 120a309b6561..089d5c4dcca0 100644 --- a/pkgs/development/libraries/ffmpeg-full/default.nix +++ b/pkgs/development/libraries/ffmpeg-full/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, perl, texinfo, yasm +{ stdenv, addOpenGLRunpath, fetchurl, fetchpatch, pkgconfig, perl, texinfo, yasm /* * Licensing options (yes some are listed twice, filters and such are not listed) */ @@ -416,7 +416,7 @@ stdenv.mkDerivation rec { "--enable-cross-compile" ]; - nativeBuildInputs = [ perl pkgconfig texinfo yasm ]; + nativeBuildInputs = [ addOpenGLRunpath perl pkgconfig texinfo yasm ]; buildInputs = [ bzip2 celt dav1d fontconfig freetype frei0r fribidi game-music-emu gnutls gsm @@ -444,6 +444,13 @@ stdenv.mkDerivation rec { cp -a tools/qt-faststart $out/bin/ ''; + postFixup = optionalString stdenv.isLinux '' + # Set RUNPATH so that libnvcuvid and libcuda in /run/opengl-driver(-32)/lib can be found. + # See the explanation in addOpenGLRunpath. + addOpenGLRunpath $out/lib/libavcodec.so + addOpenGLRunpath $out/lib/libavutil.so + ''; + enableParallelBuilding = true; meta = with stdenv.lib; { -- cgit 1.4.1