From 4b56c45aebaaa406e1fa4b43d7478a6193f546dd Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 13 May 2023 04:20:00 +0000 Subject: [PATCH] twitch-dl: init at 2.1.3 --- pkgs/tools/misc/twitch-dl/default.nix | 54 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/tools/misc/twitch-dl/default.nix diff --git a/pkgs/tools/misc/twitch-dl/default.nix b/pkgs/tools/misc/twitch-dl/default.nix new file mode 100644 index 00000000000..dd24c1c6444 --- /dev/null +++ b/pkgs/tools/misc/twitch-dl/default.nix @@ -0,0 +1,54 @@ +{ lib +, fetchFromGitHub +, python3Packages +, ffmpeg +, installShellFiles +, scdoc +}: + +python3Packages.buildPythonApplication rec { + pname = "twitch-dl"; + version = "2.1.3"; + + format = "setuptools"; + + src = fetchFromGitHub { + owner = "ihabunek"; + repo = "twitch-dl"; + rev = "refs/tags/${version}"; + hash = "sha256-uxIBt/mGmld8bxUWQvAspaX39EVfguX5qDgJ/ecz3hM="; + }; + + nativeCheckInputs = [ + installShellFiles + python3Packages.pytestCheckHook + scdoc + ]; + + propagatedBuildInputs = with python3Packages; [ + httpx + m3u8 + ]; + + disabledTestPaths = [ + # Requires network access + "tests/test_api.py" + ]; + + pythonImportsCheck = [ + "twitchdl" + ]; + + postInstall = '' + scdoc < twitch-dl.1.scd > twitch-dl.1 + installManPage twitch-dl.1 + ''; + + meta = with lib; { + description = "CLI tool for downloading videos from Twitch"; + homepage = "https://github.com/ihabunek/twitch-dl"; + changelog = "https://github.com/ihabunek/twitch-dl/blob/${version}/CHANGELOG.md"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ marsam ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7e41d9e3315..87dc393a017 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13181,6 +13181,8 @@ with pkgs; twitch-chat-downloader = python3Packages.callPackage ../applications/misc/twitch-chat-downloader { }; + twitch-dl = callPackage ../tools/misc/twitch-dl { }; + twitterBootstrap = callPackage ../development/web/twitter-bootstrap { }; twspace-crawler = callPackage ../tools/misc/twspace-crawler { };