diff options
author | Peter Simons <simons@cryp.to> | 2019-09-16 20:10:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-16 20:10:18 +0200 |
commit | 409ff06407f9e38ea3e3f764ab018a45e3932b7b (patch) | |
tree | 9834ff4efd87dd9f05f8c9c99e3f675bfda76d4e /pkgs/development/libraries/ffmpeg | |
parent | 14f5e9293c431762bf7811dba2cb73fb4bf716ad (diff) | |
parent | 46cbb8453afa5b74612ffd795cfbcab71e3d141a (diff) |
Merge pull request #67790 from ivan/mpv-ffmpeg-runpath
mpv, ffmpeg: use addOpenGLRunpath to fix CUDA-accelerated playback
Diffstat (limited to 'pkgs/development/libraries/ffmpeg')
-rw-r--r-- | pkgs/development/libraries/ffmpeg/generic.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 4c0ca0210cc85..b3310e44ae061 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, perl, texinfo, yasm +{ stdenv, fetchurl, pkgconfig, addOpenGLRunpath, perl, texinfo, yasm , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg , libssh, libtheora, libva, libdrm, libvorbis, libvpx, lzma, libpulseaudio, soxr , x264, x265, xvidcore, zlib, libopus, speex, nv-codec-headers, dav1d @@ -42,7 +42,7 @@ let inherit (stdenv) isDarwin isFreeBSD isLinux isAarch32; - inherit (stdenv.lib) optional optionals enableFeature; + inherit (stdenv.lib) optional optionals optionalString enableFeature; cmpVer = builtins.compareVersions; reqMin = requiredVersion: (cmpVer requiredVersion branch != 1); @@ -157,7 +157,7 @@ stdenv.mkDerivation rec { "--enable-cross-compile" ] ++ optional stdenv.cc.isClang "--cc=clang"; - nativeBuildInputs = [ perl pkgconfig texinfo yasm ]; + nativeBuildInputs = [ addOpenGLRunpath perl pkgconfig texinfo yasm ]; buildInputs = [ bzip2 fontconfig freetype gnutls libiconv lame libass libogg libssh libtheora @@ -186,6 +186,10 @@ stdenv.mkDerivation rec { substituteInPlace $pc \ --replace "includedir=$out" "includedir=''${!outputInclude}" done + '' + optionalString stdenv.isLinux '' + # Set RUNPATH so that libnvcuvid in /run/opengl-driver(-32)/lib can be found. + # See the explanation in addOpenGLRunpath. + addOpenGLRunpath $out/lib/libavcodec.so* ''; installFlags = [ "install-man" ]; |