Skip to content

Commit

Permalink
Merge pull request #43548 from Enzime/update/youtube-dl
Browse files Browse the repository at this point in the history
youtube-dl: 2018.05.18 -> 2018.07.10
  • Loading branch information
adisbladis committed Jul 15, 2018
2 parents 064bff0 + 6308fa8 commit d3ed77f
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions pkgs/tools/misc/youtube-dl/default.nix
@@ -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
Expand All @@ -12,31 +12,30 @@
, 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
# atomicparsley for embedding thumbnails
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
Expand All @@ -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";
Expand All @@ -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 ];
};
}

0 comments on commit d3ed77f

Please sign in to comment.