about summary refs log tree commit diff
path: root/pkgs/applications/misc/twitch-chat-downloader/default.nix
blob: 779b9ddba63bf84fd4281c8a15d8d15b9ac25e16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ lib
, buildPythonApplication
, fetchPypi
, requests
, twitch-python
, pytz
, python-dateutil
}:

buildPythonApplication rec {
  pname = "twitch-chat-downloader";
  version = "3.2.2";

  src = fetchPypi {
    inherit version;
    pname = "tcd";
    sha256 = "ee6a8e22c54ccfd29988554b13fe56b2a1bf524e110fa421d77e27baa8dcaa19";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'pipenv==2022.4.30'," "" \
      --replace "setuptools==62.1." "setuptools" \
      --replace "requests==2.27.1" "requests" \
      --replace "twitch-python==0.0.20" "twitch-python" \
      --replace "pytz==2022.1" "pytz" \
      --replace "python-dateutil==2.8.2" "python-dateutil"
  '';

  propagatedBuildInputs = [ requests twitch-python pytz python-dateutil ];

  doCheck = false; # no tests

  pythonImportsCheck = [ "tcd" ];

  meta = with lib; {
    description = "Twitch Chat Downloader";
    homepage = "https://github.com/PetterKraabol/Twitch-Chat-Downloader";
    license = licenses.mit;
    maintainers = with maintainers; [ marsam ];
  };
}