youtube-dl: add optional support for RTMP

This commit is contained in:
Lorenzo Manacorda 2016-11-06 17:29:15 +01:00
parent 858f088007
commit 2fcbe451f2

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, buildPythonApplication, makeWrapper, zip, ffmpeg, pandoc { stdenv, fetchurl, buildPythonApplication, makeWrapper, zip, ffmpeg, rtmpdump, pandoc
, atomicparsley , atomicparsley
# Pandoc is required to build the package's man page. Release tarballs contain a # Pandoc is required to build the package's man page. Release tarballs contain a
# formatted man page already, though, it will still be installed. We keep the # formatted man page already, though, it will still be installed. We keep the
@ -7,6 +7,7 @@
# included. # included.
, generateManPage ? false , generateManPage ? false
, ffmpegSupport ? true , ffmpegSupport ? true
, rtmpSupport ? true
}: }:
with stdenv.lib; with stdenv.lib;
@ -24,9 +25,10 @@ buildPythonApplication rec {
buildInputs = [ makeWrapper zip ] ++ optional generateManPage pandoc; buildInputs = [ makeWrapper zip ] ++ optional generateManPage pandoc;
# Ensure ffmpeg is available in $PATH for post-processing & transcoding support. # Ensure ffmpeg is available in $PATH for post-processing & transcoding support.
# rtmpdump is required to download files over RTMP
# atomicparsley for embedding thumbnails # atomicparsley for embedding thumbnails
postInstall = let postInstall = let
packagesthatwillbeusedbelow = [ atomicparsley ] ++ optional ffmpegSupport ffmpeg; packagesthatwillbeusedbelow = [ atomicparsley ] ++ optional ffmpegSupport ffmpeg ++ optional rtmpSupport rtmpdump;
in '' in ''
wrapProgram $out/bin/youtube-dl --prefix PATH : "${makeBinPath packagesthatwillbeusedbelow}" wrapProgram $out/bin/youtube-dl --prefix PATH : "${makeBinPath packagesthatwillbeusedbelow}"
''; '';