nixos/tests/userborn: fix setting hostPlatform (#378940)
[NixPkgs.git] / pkgs / applications / misc / twitch-chat-downloader / default.nix
blobe3b42c54a1988fff2d04e0595100219cfd18afde
2   lib,
3   buildPythonApplication,
4   fetchFromGitHub,
5   iso8601,
6   progressbar2,
7   requests,
8 }:
10 buildPythonApplication rec {
11   pname = "twitch-chat-downloader";
12   version = "2.5.4";
14   # NOTE: Using maintained fork because upstream has stopped working, and it has
15   # not been updated in a while.
16   # https://github.com/PetterKraabol/Twitch-Chat-Downloader/issues/142
17   src = fetchFromGitHub {
18     owner = "TheDrHax";
19     repo = "twitch-chat-downloader";
20     rev = version;
21     hash = "sha256-mV60ygrtQa9ZkJ2CImhAV59ckCJ7vJSA9cWkYE2xo1M=";
22   };
24   postPatch = ''
25     # Update client ID for Twitch changes
26     # See: <https://github.com/TheDrHax/Twitch-Chat-Downloader/pull/16>
27     substituteInPlace tcd/example.settings.json \
28       --replace-fail jzkbprff40iqj646a697cyrvl0zt2m6 kd1unb4b3q4t58fwlpcbzcbnm76a8fp
29   '';
31   propagatedBuildInputs = [
32     iso8601
33     progressbar2
34     requests
35   ];
37   doCheck = false; # no tests
39   pythonImportsCheck = [ "tcd" ];
41   meta = with lib; {
42     description = "Twitch Chat Downloader";
43     mainProgram = "tcd";
44     homepage = "https://github.com/TheDrHax/Twitch-Chat-Downloader";
45     license = licenses.mit;
46     maintainers = with maintainers; [ assistant ];
47   };