aboutsummaryrefslogtreecommitdiff
path: root/.config/nixpkgs/packages
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2021-11-02 00:48:07 -0400
committertdro <tdro@users.noreply.github.com>2021-11-02 00:48:07 -0400
commitf71472fccc6fa894ec1be945614d6baf4f40d56c (patch)
tree706c0ffc9c5f918e84ab488cd5563327d0919aba /.config/nixpkgs/packages
parentd1376c8c2089631b16db5a876123c54de8e2af0f (diff)
downloaddotfiles-f71472fccc6fa894ec1be945614d6baf4f40d56c.tar.gz
dotfiles-f71472fccc6fa894ec1be945614d6baf4f40d56c.tar.bz2
dotfiles-f71472fccc6fa894ec1be945614d6baf4f40d56c.zip
.config/nixpkgs/packages/youtube-dl: Swap to yt-dlp
Diffstat (limited to '.config/nixpkgs/packages')
-rw-r--r--.config/nixpkgs/packages/youtube-dl/default.nix66
1 files changed, 23 insertions, 43 deletions
diff --git a/.config/nixpkgs/packages/youtube-dl/default.nix b/.config/nixpkgs/packages/youtube-dl/default.nix
index 7887edb..5a0ab1d 100644
--- a/.config/nixpkgs/packages/youtube-dl/default.nix
+++ b/.config/nixpkgs/packages/youtube-dl/default.nix
@@ -1,56 +1,36 @@
-{ python38Packages, lib, fetchurl, zip, ffmpeg, rtmpdump, phantomjs2
-, atomicparsley, pandoc, generateManPage ? true, ffmpegSupport ? true
-, rtmpSupport ? true, phantomjsSupport ? false, hlsEncryptedSupport ? true
-, installShellFiles, makeWrapper }:
+{ lib, python39, ffmpeg, rtmpdump, phantomjs2, atomicparsley
+, ffmpegSupport ? true, rtmpSupport ? true, phantomjsSupport ? false
+, hlsEncryptedSupport ? true, withAlias ? true }:
-python38Packages.buildPythonPackage rec {
+with python39.pkgs;
- pname = "youtube-dl";
- version = "2021.05.16";
+buildPythonPackage rec {
+ pname = "yt-dlp";
+ version = "2021.10.22";
- src = fetchurl {
- url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz";
- sha256 = "1z8sdzvkxhscnzy7cnjag308glif0k8jylr11biqwzypm1f2l0fl";
+ src = fetchPypi {
+ inherit pname;
+ version = builtins.replaceStrings [ ".0" ] [ "." ] version;
+ sha256 = "sha256-okuWZr0iNBSeTajE8Wu45fdGwpQo0S7gT8HBG1JHowc=";
};
- nativeBuildInputs = [ installShellFiles makeWrapper ];
- buildInputs = [ zip ] ++ lib.optional generateManPage pandoc;
- propagatedBuildInputs =
- lib.optional hlsEncryptedSupport python38Packages.pycryptodome;
+ propagatedBuildInputs = [ websockets mutagen ] ++ lib.optional hlsEncryptedSupport pycryptodomex;
- makeWrapperArgs = let
- packagesToBinPath = [ atomicparsley ] ++ lib.optional ffmpegSupport ffmpeg
- ++ lib.optional rtmpSupport rtmpdump
- ++ lib.optional phantomjsSupport phantomjs2;
+ makeWrapperArgs = let packagesToBinPath = [ atomicparsley ]
+ ++ lib.optional ffmpegSupport ffmpeg
+ ++ lib.optional rtmpSupport rtmpdump
+ ++ lib.optional phantomjsSupport phantomjs2;
in [ ''--prefix PATH : "${lib.makeBinPath packagesToBinPath}"'' ];
- setupPyBuildFlags = [ "build_lazy_extractors" ];
-
- postInstall = ''
- installShellCompletion youtube-dl.zsh
- '';
-
doCheck = false;
+ setupPyBuildFlags = [ "build_lazy_extractors" ];
+ postInstall = lib.optionalString withAlias ''ln -s "$out/bin/yt-dlp" "$out/bin/youtube-dl"'';
meta = with lib; {
- homepage = "https://ytdl-org.github.io/youtube-dl/";
- description =
- "Command-line tool to download videos from YouTube.com and other sites";
- 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;
- maintainers = with maintainers; [
- bluescreen303
- phreedom
- AndersonTorres
- fpletz
- enzime
- ma27
- ];
+ license = licenses.unlicense;
+ maintainers = with maintainers; [ mkg20001 ];
+ homepage = "https://github.com/yt-dlp/yt-dlp/";
+ changelog = "https://github.com/yt-dlp/yt-dlp/raw/${version}/Changelog.md";
+ description = "Command-line tool to download videos from YouTube.com and other sites (youtube-dl fork)";
};
}