about summary refs log tree commit diff
path: root/pkgs/development/python-modules/linear-garage-door/default.nix
blob: b57f8b0e47afdc197ca53eb27e035b784b71a190 (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
{ lib
, aiohttp
, buildPythonPackage
, dnspython
, fetchFromGitHub
, poetry-core
, pythonOlder
, tenacity
}:

buildPythonPackage rec {
  pname = "linear-garage-door";
  version = "0.2.9";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "IceBotYT";
    repo = "linear-garage-door";
    rev = "refs/tags/${version}";
    hash = "sha256-hWWJgZnEItYaSxka7zBHPeVlTEiOqRnA2vg6/MvpJGE=";
  };

  postPatch = ''
    sed -i pyproject.toml \
      -e "/--cov/d" \
      -e "/--no-cov/d"
  '';

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    aiohttp
    dnspython
    tenacity
  ];

  # Module doesn't have tests
  doCheck = false;

  pythonImportsCheck = [
    "linear_garage_door"
  ];

  meta = with lib; {
    description = "Control Linear Garage Doors with Python";
    homepage = "https://github.com/IceBotYT/linear-garage-door";
    changelog = "https://github.com/IceBotYT/linear-garage-door/blob/${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}