2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
, installShellFiles
|
|
|
|
, scdoc
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "twitch-dl";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.3.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ihabunek";
|
|
|
|
repo = "twitch-dl";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-0uOOc3ANXleQlENB+gdWheafBiOOcyZsFvYj7r+WMCY=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"m3u8"
|
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
python3Packages.setuptools
|
|
|
|
python3Packages.setuptools-scm
|
2024-05-15 15:35:15 +00:00
|
|
|
python3Packages.pythonRelaxDepsHook
|
2023-05-24 13:37:59 +00:00
|
|
|
installShellFiles
|
|
|
|
scdoc
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2024-04-21 15:54:59 +00:00
|
|
|
click
|
2023-05-24 13:37:59 +00:00
|
|
|
httpx
|
|
|
|
m3u8
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
python3Packages.pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Requires network access
|
|
|
|
"tests/test_api.py"
|
2024-05-15 15:35:15 +00:00
|
|
|
"tests/test_cli.py"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"twitchdl"
|
2024-05-15 15:35:15 +00:00
|
|
|
"twitchdl.cli"
|
|
|
|
"twitchdl.download"
|
|
|
|
"twitchdl.entities"
|
|
|
|
"twitchdl.http"
|
|
|
|
"twitchdl.output"
|
|
|
|
"twitchdl.playlists"
|
|
|
|
"twitchdl.progress"
|
|
|
|
"twitchdl.twitch"
|
|
|
|
"twitchdl.utils"
|
|
|
|
"twitchdl.commands"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/ihabunek/twitch-dl/blob/${src.rev}/CHANGELOG.md";
|
2023-05-24 13:37:59 +00:00
|
|
|
license = licenses.gpl3Only;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ pbsds ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "twitch-dl";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
}
|