about summary refs log tree commit diff
path: root/pkgs/development/python-modules/habitipy/default.nix
blob: 980dc0726991b63125b74d6d33b089be2a70c692 (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
59
60
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  plumbum,
  requests,
  setuptools,
  hypothesis,
  pytestCheckHook,
  responses,
}:

buildPythonPackage rec {
  pname = "habitipy";
  version = "0.3.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ASMfreaK";
    repo = "habitipy";
    # TODO: https://github.com/ASMfreaK/habitipy/issues/27
    rev = "faaca8840575fe8b807bf17acea6266d5ce92a99";
    hash = "sha256-BGFUAntSNH0YYWn9nfKjIlpevF7MFs0csCPSp6IT6Ro=";
  };

  build-system = [ setuptools ];

  dependencies = [
    plumbum
    requests
    setuptools
  ];

  nativeCheckInputs = [
    hypothesis
    pytestCheckHook
    responses
  ];

  preCheck = ''
    export HOME=$TMPDIR
  '';

  disabledTests = [
    # network access
    "test_content_cache"
    # hypothesis.errors.InvalidArgument: tests/test_cli.py::test_data is a function that returns a Hypothesis strategy, but pytest has collected it as a test function.
    "test_data"
  ];

  pythonImportsCheck = [ "habitipy" ];

  meta = with lib; {
    description = "Tools and library for Habitica restful API";
    mainProgram = "habitipy";
    homepage = "https://github.com/ASMfreaK/habitipy";
    license = licenses.mit;
    maintainers = with maintainers; [ dotlambda ];
  };
}