mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-05-04 10:17:01 +00:00
yt-dlp: add option to install a youtube-dl alias
youtube-dl development seems to have stalled and yt-dlp is the de-facto upstream nowadays. This provides an easy way to use yt-dlp as a drop-in replacement: youtube-dl = yt-dlp.override { withAlias = true; };
This commit is contained in:
parent
bc9b956714
commit
bac5fde048
1 changed files with 5 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
||||||
, rtmpSupport ? true
|
, rtmpSupport ? true
|
||||||
, phantomjsSupport ? false
|
, phantomjsSupport ? false
|
||||||
, hlsEncryptedSupport ? true
|
, hlsEncryptedSupport ? true
|
||||||
|
, withAlias ? false # Provides bin/youtube-dl for backcompat
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -50,6 +51,10 @@ buildPythonPackage rec {
|
||||||
# Requires network
|
# Requires network
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall = lib.optionalString withAlias ''
|
||||||
|
ln -s "$out/bin/yt-dlp" "$out/bin/youtube-dl"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/yt-dlp/yt-dlp/";
|
homepage = "https://github.com/yt-dlp/yt-dlp/";
|
||||||
description = "Command-line tool to download videos from YouTube.com and other sites (youtube-dl fork)";
|
description = "Command-line tool to download videos from YouTube.com and other sites (youtube-dl fork)";
|
||||||
|
|
Loading…
Add table
Reference in a new issue