From 47586a182d768f96bda3e25ce32a76f2e8755dbd Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Sat, 24 Apr 2021 22:14:04 +0100 Subject: [PATCH 1/2] ffmpeg: add support for libsrt based upon https://github.com/NixOS/nixpkgs/commit/47801afc3d342907fc00ea4467d23af636c4a3c4 --- pkgs/development/libraries/ffmpeg/generic.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 82f1a8bf5646..587eaa9d822b 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -2,6 +2,7 @@ , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg , libssh, libtheora, libva, libdrm, libvorbis, libvpx, xz, libpulseaudio, soxr , x264, x265, xvidcore, zlib, libopus, speex, nv-codec-headers, dav1d +, srt ? null , openglSupport ? false, libGLU ? null, libGL ? null , libmfxSupport ? false, intel-media-sdk ? null , libaomSupport ? false, libaom ? null @@ -94,6 +95,7 @@ stdenv.mkDerivation rec { # Build flags "--enable-shared" (ifMinVer "0.6" "--enable-pic") + (enableFeature (srt != null) "libsrt") (enableFeature runtimeCpuDetectBuild "runtime-cpudetect") "--enable-hardcoded-tables" ] ++ @@ -171,7 +173,7 @@ stdenv.mkDerivation rec { buildInputs = [ bzip2 fontconfig freetype gnutls libiconv lame libass libogg libssh libtheora - libvorbis xz soxr x264 x265 xvidcore zlib libopus speex nv-codec-headers + libvorbis xz soxr x264 x265 xvidcore zlib libopus speex srt nv-codec-headers ] ++ optionals openglSupport [ libGL libGLU ] ++ optional libmfxSupport intel-media-sdk ++ optional libaomSupport libaom From 065a8102c9867e85e47af0d94596a5ff24b9257d Mon Sep 17 00:00:00 2001 From: MatthewCroughan Date: Tue, 3 Aug 2021 13:02:23 +0100 Subject: [PATCH 2/2] Update pkgs/development/libraries/ffmpeg/generic.nix Co-authored-by: Michal Sojka --- pkgs/development/libraries/ffmpeg/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 587eaa9d822b..bd0e79acad6b 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -95,7 +95,7 @@ stdenv.mkDerivation rec { # Build flags "--enable-shared" (ifMinVer "0.6" "--enable-pic") - (enableFeature (srt != null) "libsrt") + (ifMinVer "4.0" (enableFeature (srt != null) "libsrt")) (enableFeature runtimeCpuDetectBuild "runtime-cpudetect") "--enable-hardcoded-tables" ] ++