summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyqwikswitch/default.nix
blob: 0a22ec145f064fc09ceb98bd2f14980b9bbe6899 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  lib,
  buildPythonPackage,
  fetchpatch,
  fetchPypi,
  attrs,
  requests,
  setuptools,
}:

buildPythonPackage rec {
  pname = "pyqwikswitch";
  version = "0.94";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-IpyWz+3EMr0I+xULBJJhBgdnQHNPJIM1SqKFLpszhQc=";
  };

  patches = [
    # https://github.com/kellerza/pyqwikswitch/pull/7
    (fetchpatch {
      name = "replace-async-timeout-with-asyncio.timeout.patch";
      url = "https://github.com/kellerza/pyqwikswitch/commit/7b3f2211962b30bb6beea9a4fe17cd04cdf8e27f.patch";
      hash = "sha256-sdO5jzIgKdneNY5dTngIzUFtyRg7HBGaZA1BBeAJxu4=";
    })
  ];

  build-system = [ setuptools ];

  dependencies = [
    attrs
    requests
  ];

  pythonImportsCheck = [
    "pyqwikswitch"
    "pyqwikswitch.threaded"
  ];

  doCheck = false; # no tests in sdist

  meta = {
    description = "QwikSwitch USB Modem API binding for Python";
    homepage = "https://github.com/kellerza/pyqwikswitch";
    license = lib.licenses.mit;
    teams = [ lib.teams.home-assistant ];
  };
}