diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2024-04-15 04:20:00 +0000 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2024-04-15 04:20:00 +0000 |
commit | 86be7391aa273f5f652dd4d2d9595d5e643eaeca (patch) | |
tree | 7724e8a6cae13a2b567479d1a6f942f3e856ee0b /pkgs/by-name/tw/twitch-dl | |
parent | 26c7dc31d209e10f9e9f0e724ce3a349be9a0160 (diff) |
twitch-dl: migrate to pkgs/by-name
Diffstat (limited to 'pkgs/by-name/tw/twitch-dl')
-rw-r--r-- | pkgs/by-name/tw/twitch-dl/package.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/by-name/tw/twitch-dl/package.nix b/pkgs/by-name/tw/twitch-dl/package.nix new file mode 100644 index 0000000000000..15a3e262e5752 --- /dev/null +++ b/pkgs/by-name/tw/twitch-dl/package.nix @@ -0,0 +1,54 @@ +{ lib +, fetchFromGitHub +, python3Packages +, installShellFiles +, scdoc +}: + +python3Packages.buildPythonApplication rec { + pname = "twitch-dl"; + version = "2.1.4"; + + format = "setuptools"; + + src = fetchFromGitHub { + owner = "ihabunek"; + repo = "twitch-dl"; + rev = "refs/tags/${version}"; + hash = "sha256-0mITsNQQWG6lVQSxnDdU4ta548AR9q+zs/E96uwtG/U="; + }; + + 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 ]; + mainProgram = "twitch-dl"; + }; +} |