summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/py-sucks/default.nix
blob: 9d9373a3e33b00e7d883680abdc40dd9200af61a (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
51
52
53
54
55
56
57
58
59
60
61
62
63
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  click,
  pycountry-convert,
  pycryptodome,
  requests,
  sleekxmppfs,
  requests-mock,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "py-sucks";
  version = "0.9.11";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "mib1185";
    repo = "py-sucks";
    tag = "v${version}";
    hash = "sha256-srj/3x04R9KgbdC6IgbQdgUz+srAx0OttB6Ndb2+Nh4=";
  };

  build-system = [ setuptools ];

  dependencies = [
    pycryptodome
    requests
    sleekxmppfs
  ];

  optional-dependencies = {
    cli = [
      click
      pycountry-convert
    ];
  };

  pythonImportsCheck = [ "sucks" ];

  nativeCheckInputs = [
    requests-mock
    pytestCheckHook
  ]
  ++ lib.concatAttrValues optional-dependencies;

  disabledTests = [
    # assumes $HOME is at a specific place
    "test_config_file_name"
  ];

  meta = {
    changelog = "https://github.com/mib1185/py-sucks/releases/tag/${src.tag}";
    description = "Library for controlling certain robot vacuums";
    homepage = "https://github.com/mib1185/py-sucks";
    license = lib.licenses.gpl3Only;
    mainProgram = "sucks";
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}