summary refs log tree commit diff
path: root/pkgs/development/python-modules/eebrightbox/default.nix
blob: d8050b9bf5e32dc87a9dea73e02f3f5a1d9a3a6f (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, pbr
, calmjs-parse
, certifi
, chardet
, idna
, ply
, requests
, urllib3
, httpretty
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "eebrightbox";
  version = "0.0.6";

  src = fetchFromGitHub {
    owner = "krygal";
    repo = "eebrightbox";
    rev = version;
    sha256 = "1kms240g01871qbvyc5rzf86yxsrlnfvp323jh4k35fpf45z44rr";
  };

  postPatch = ''
    substituteInPlace requirements.txt --replace "==" ">="
  '';

  nativeBuildInputs = [
    pbr
  ];

  PBR_VERSION = version;

  propagatedBuildInputs = [
    calmjs-parse
    certifi
    chardet
    idna
    ply
    requests
    urllib3
  ];

  checkInputs = [
    httpretty
    pytestCheckHook
  ];

  meta = with lib; {
    description = "Connector for EE BrightBox routers";
    homepage = "https://github.com/krygal/eebrightbox";
    license = licenses.mit;
    maintainers = with maintainers; [ dotlambda ];
  };
}