aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/samsungtvws/default.nix
blob: b41935c582561a195ed98b38b9e1f8c4afc4695f (plain)
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
{ lib, buildPythonPackage, fetchPypi, isPy27
, requests
, websocket_client
}:

buildPythonPackage rec {
  pname = "samsungtvws";
  version = "1.5.3";
  disabled = isPy27;

  src = fetchPypi {
    inherit pname version;
    sha256 = "054rr8hiacdjfxqssnxnd3xp9hh8350zjzzjvh1199bpps4l1l6n";
  };

  patchPhase = ''
    substituteInPlace setup.py --replace "websocket-client==" "websocket-client>="
  '';

  propagatedBuildInputs = [
    websocket_client
    requests
  ];

  # no tests
  doCheck = false;

  pythonImportsCheck = [ "samsungtvws" ];

  meta = with lib; {
    description = "Samsung Smart TV WS API wrapper";
    homepage = "https://github.com/xchwarze/samsung-tv-ws-api";
    license = licenses.mit;
    maintainers = with maintainers; [ hexa ];
  };
}