about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2024-04-15 19:01:01 -0500
committerGitHub <noreply@github.com>2024-04-15 19:01:01 -0500
commit1df062db9ee137c22376f5fd73f46dfc4a025241 (patch)
tree8707c7fb264ad74cb992b19836352ffbdc7e2c6e
parent4498a08b5d1867ce92dbedbfb8bdd1cb8b0f94a0 (diff)
parent5385c6eec1f73abfa9f0c48719df0dfe7440f218 (diff)
Merge pull request #304263 from marsam/update-twitch-dl
twitch-dl: 2.1.4 -> 2.2.0
-rw-r--r--pkgs/by-name/tw/twitch-dl/package.nix (renamed from pkgs/tools/misc/twitch-dl/default.nix)24
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 17 insertions, 9 deletions
diff --git a/pkgs/tools/misc/twitch-dl/default.nix b/pkgs/by-name/tw/twitch-dl/package.nix
index 15a3e262e5752..29340a7f06c66 100644
--- a/pkgs/tools/misc/twitch-dl/default.nix
+++ b/pkgs/by-name/tw/twitch-dl/package.nix
@@ -7,28 +7,38 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "twitch-dl";
-  version = "2.1.4";
-
-  format = "setuptools";
+  version = "2.2.0";
+  pyproject = true;
 
   src = fetchFromGitHub {
     owner = "ihabunek";
     repo = "twitch-dl";
     rev = "refs/tags/${version}";
-    hash = "sha256-0mITsNQQWG6lVQSxnDdU4ta548AR9q+zs/E96uwtG/U=";
+    hash = "sha256-H2SxZgEjVdj/GRguJ2v/WWUrh0VTrwFV9mZVn/EYyPg=";
   };
 
-  nativeCheckInputs = [
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace-fail 'm3u8>=1.0.0,<4.0.0' 'm3u8>=1.0.0'
+  '';
+
+  nativeBuildInputs = [
+    python3Packages.setuptools
+    python3Packages.setuptools-scm
     installShellFiles
-    python3Packages.pytestCheckHook
     scdoc
   ];
 
   propagatedBuildInputs = with python3Packages; [
+    click
     httpx
     m3u8
   ];
 
+  nativeCheckInputs = [
+    python3Packages.pytestCheckHook
+  ];
+
   disabledTestPaths = [
     # Requires network access
     "tests/test_api.py"
@@ -46,7 +56,7 @@ python3Packages.buildPythonApplication rec {
   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";
+    changelog = "https://github.com/ihabunek/twitch-dl/blob/${src.rev}/CHANGELOG.md";
     license = licenses.gpl3Only;
     maintainers = with maintainers; [ marsam ];
     mainProgram = "twitch-dl";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 241221fd65e68..69d67ab5bb7bd 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -14049,8 +14049,6 @@ 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 { };