Skip to content

Commit

Permalink
youtube-dl: update to version 2018.05.18
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-d committed Jun 5, 2018
1 parent da65d64 commit 243b1f1
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions pkgs/tools/misc/youtube-dl/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, buildPythonApplication
, zip, ffmpeg, rtmpdump, atomicparsley, pycryptodome, pandoc
{ stdenv, 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
# manpage argument in place in case someone wants to use this derivation to
Expand All @@ -8,18 +8,19 @@
, generateManPage ? false
, ffmpegSupport ? true
, rtmpSupport ? true
, phantomjsSupport ? false
, hlsEncryptedSupport ? true
, makeWrapper }:

with stdenv.lib;
buildPythonApplication rec {
buildPythonPackage rec {

name = "youtube-dl-${version}";
version = "2017.10.20";
pname = "youtube-dl";
version = "2018.05.18";

src = fetchurl {
url = "https://yt-dl.org/downloads/${version}/${name}.tar.gz";
sha256 = "0npr8b1xg1dylz717kfllw433h1y16251npzch48lchq69bhm4iy";
url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz";
sha256 = "11r0hv6885w8k4m307kvf9545vr5a3ym9bf7szghvbcgmgc8lm5w";
};

nativeBuildInputs = [ makeWrapper ];
Expand All @@ -29,20 +30,24 @@ buildPythonApplication rec {
# Ensure ffmpeg is available in $PATH for post-processing & transcoding support.
# rtmpdump is required to download files over RTMP
# atomicparsley for embedding thumbnails
postInstall = let
packagesToBinPath =
[ atomicparsley ]
++ optional ffmpegSupport ffmpeg
++ optional rtmpSupport rtmpdump;
in ''
wrapProgram $out/bin/youtube-dl --prefix PATH : "${makeBinPath packagesToBinPath}"
makeWrapperArgs = let
packagesToBinPath =
[ atomicparsley ]
++ optional ffmpegSupport ffmpeg
++ optional rtmpSupport rtmpdump
++ optional phantomjsSupport phantomjs2;
in [ ''--prefix PATH : "${makeBinPath packagesToBinPath}"'' ];

postInstall = ''
mkdir -p $out/share/zsh/site-functions
cp youtube-dl.zsh $out/share/zsh/site-functions/_youtube-dl
'';

# Requires network
doCheck = false;

meta = {
homepage = http://rg3.github.io/youtube-dl/;
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";
longDescription = ''
Expand Down

0 comments on commit 243b1f1

Please sign in to comment.