2016-02-19 13:12:11 +01:00
|
|
|
{ stdenv, fetchurl, buildPythonApplication, makeWrapper, ffmpeg, zip
|
2016-01-05 20:08:53 +01:00
|
|
|
, pandoc ? null
|
|
|
|
}:
|
2015-06-05 05:57:40 +02:00
|
|
|
|
2015-06-05 10:38:35 +02:00
|
|
|
# Pandoc is required to build the package's man page. Release tarballs
|
|
|
|
# contain a formatted man page already, though, so it's fine to pass
|
|
|
|
# "pandoc = null" to this derivation; the man page will still be
|
|
|
|
# installed. We keep the pandoc argument and build input in place in
|
|
|
|
# case someone wants to use this derivation to build a Git version of
|
|
|
|
# the tool that doesn't have the formatted man page included.
|
2012-01-18 21:32:37 +01:00
|
|
|
|
2016-02-19 13:12:11 +01:00
|
|
|
buildPythonApplication rec {
|
2015-11-01 12:19:23 +01:00
|
|
|
|
2016-01-25 19:09:38 +01:00
|
|
|
name = "youtube-dl-${version}";
|
2016-05-26 23:33:33 +02:00
|
|
|
version = "2016.05.21.2";
|
2012-01-18 21:32:37 +01:00
|
|
|
|
2012-12-27 20:37:04 +01:00
|
|
|
src = fetchurl {
|
2016-04-08 10:15:01 +02:00
|
|
|
url = "http://yt-dl.org/downloads/${version}/${name}.tar.gz";
|
2016-05-26 23:33:33 +02:00
|
|
|
sha256 = "66f94fc97012c4c7a6338dc4df6ec62af66dcfc144c5e8c8cd8b5519756f1a98";
|
2012-01-18 21:32:37 +01:00
|
|
|
};
|
|
|
|
|
2015-06-07 20:34:29 +02:00
|
|
|
buildInputs = [ makeWrapper zip pandoc ];
|
2012-01-18 21:32:37 +01:00
|
|
|
|
2015-05-28 16:04:51 +02:00
|
|
|
# Ensure ffmpeg is available in $PATH for post-processing & transcoding support.
|
2015-08-19 01:45:59 +02:00
|
|
|
postInstall = stdenv.lib.optionalString (ffmpeg != null)
|
2015-10-11 16:34:23 +02:00
|
|
|
''wrapProgram $out/bin/youtube-dl --prefix PATH : "${ffmpeg.bin}/bin"'';
|
2015-03-25 23:25:01 +01:00
|
|
|
|
2016-01-25 19:09:38 +01:00
|
|
|
# Requires network
|
|
|
|
doCheck = false;
|
|
|
|
|
2015-05-28 16:04:51 +02:00
|
|
|
meta = with stdenv.lib; {
|
2015-11-01 12:19:23 +01:00
|
|
|
homepage = http://rg3.github.io/youtube-dl/;
|
2013-12-09 23:51:04 +01:00
|
|
|
repositories.git = https://github.com/rg3/youtube-dl.git;
|
2012-12-27 20:37:04 +01:00
|
|
|
description = "Command-line tool to download videos from YouTube.com and other sites";
|
2015-04-04 18:59:14 +02:00
|
|
|
longDescription = ''
|
|
|
|
youtube-dl is a small, Python-based command-line program
|
|
|
|
to download videos from YouTube.com and a few more sites.
|
|
|
|
youtube-dl is released to the public domain, which means
|
|
|
|
you can modify it, redistribute it or use it however you like.
|
|
|
|
'';
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2016-05-16 22:30:20 +02:00
|
|
|
maintainers = with maintainers; [ bluescreen303 phreedom AndersonTorres fuuzetsu ];
|
2012-01-18 21:32:37 +01:00
|
|
|
};
|
|
|
|
}
|