Merge pull request #43548 from Enzime/update/youtube-dl

youtube-dl: 2018.05.18 -> 2018.07.10
This commit is contained in:
adisbladis 2018-07-15 15:59:43 +08:00 committed by GitHub
commit d3ed77f1fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ stdenv, targetPlatform, fetchurl, buildPythonPackage
{ stdenv, lib, targetPlatform, fetchurl, buildPythonPackage
, zip, ffmpeg, rtmpdump, phantomjs2, atomicparsley, pycryptodome, pandoc
# 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
@ -12,20 +12,19 @@
, hlsEncryptedSupport ? true
, makeWrapper }:
with stdenv.lib;
buildPythonPackage rec {
pname = "youtube-dl";
version = "2018.05.18";
version = "2018.07.10";
src = fetchurl {
url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz";
sha256 = "11r0hv6885w8k4m307kvf9545vr5a3ym9bf7szghvbcgmgc8lm5w";
sha256 = "1rigah941k2drzx5qz937lk68gw9jrizj5lgd9f9znp0bgi2d0xd";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ zip ] ++ optional generateManPage pandoc;
propagatedBuildInputs = optional hlsEncryptedSupport pycryptodome;
buildInputs = [ zip ] ++ lib.optional generateManPage pandoc;
propagatedBuildInputs = lib.optional hlsEncryptedSupport pycryptodome;
# Ensure ffmpeg is available in $PATH for post-processing & transcoding support.
# rtmpdump is required to download files over RTMP
@ -33,10 +32,10 @@ buildPythonPackage rec {
makeWrapperArgs = let
packagesToBinPath =
[ atomicparsley ]
++ optional ffmpegSupport ffmpeg
++ optional rtmpSupport rtmpdump
++ optional phantomjsSupport phantomjs2;
in [ ''--prefix PATH : "${makeBinPath packagesToBinPath}"'' ];
++ lib.optional ffmpegSupport ffmpeg
++ lib.optional rtmpSupport rtmpdump
++ lib.optional phantomjsSupport phantomjs2;
in [ ''--prefix PATH : "${lib.makeBinPath packagesToBinPath}"'' ];
postInstall = ''
mkdir -p $out/share/zsh/site-functions
@ -46,7 +45,7 @@ buildPythonPackage rec {
# Requires network
doCheck = false;
meta = {
meta = with lib; {
homepage = https://rg3.github.io/youtube-dl/;
repositories.git = https://github.com/rg3/youtube-dl.git;
description = "Command-line tool to download videos from YouTube.com and other sites";
@ -58,6 +57,6 @@ buildPythonPackage rec {
'';
license = licenses.publicDomain;
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ bluescreen303 phreedom AndersonTorres fuuzetsu fpletz ];
maintainers = with maintainers; [ bluescreen303 phreedom AndersonTorres fuuzetsu fpletz enzime ];
};
}