about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/catt/default.nix
blob: 1270fbae33d259a1edae820d04444fb558a65595 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{ lib
, fetchFromGitHub
, fetchPypi
, python3
}:

let
  py = python3.override {
    packageOverrides = self: super: {
      # Upstream is pinning releases incl. dependencies of their dependencies
      zeroconf = super.zeroconf.overridePythonAttrs (oldAttrs: rec {
        version = "0.31.0";
        src = fetchFromGitHub {
          owner = "jstasiak";
          repo = "python-zeroconf";
          rev = version;
          hash = "sha256-8pYbIkPsg16VelwqpYSzqfAJaCU37lun+XZ/crzCDZU=";
        };
      });

      click = super.click.overridePythonAttrs (oldAttrs: rec {
        version = "7.1.2";
        src = oldAttrs.src.override {
          inherit version;
          hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
        };
        disabledTests = [ "test_bytes_args" ]; # https://github.com/pallets/click/commit/6e05e1fa1c2804
      });

      pychromecast = super.pychromecast.overridePythonAttrs (oldAttrs: rec {
        version = "9.2.0";
        src = oldAttrs.src.override {
          inherit version;
          hash = "sha256-bTRZNXXPd1Zd9Hr0x13UfGplgx7BiowQtTZ7LxwXLwo=";
        };
      });
    };
  };
in
with py.pkgs;

buildPythonApplication rec {
  pname = "catt";
  version = "0.12.7";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-Q9ePWRLwuuTG+oPKFg7xn1gj4uAVlXUxegWdyH3Yd90=";
  };

  propagatedBuildInputs = [
    click
    ifaddr
    pychromecast
    protobuf
    requests
    yt-dlp
  ];

  doCheck = false; # attempts to access various URLs

  pythonImportsCheck = [
    "catt"
  ];

  meta = with lib; {
    description = "Tool to send media from online sources to Chromecast devices";
    homepage = "https://github.com/skorokithakis/catt";
    license = licenses.bsd2;
    maintainers = with maintainers; [ dtzWill ];
  };
}