summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/aocd/default.nix
blob: a61ccda40e6046130f856ed7394b3ae3578891a9 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
{
  lib,
  aocd-example-parser,
  beautifulsoup4,
  buildPythonPackage,
  fetchFromGitHub,
  numpy,
  pebble,
  pook,
  pytest-freezegun,
  pytest-mock,
  pytest-cov-stub,
  pytest-raisin,
  pytest-socket,
  pytestCheckHook,
  python-dateutil,
  requests,
  requests-mock,
  rich,
  setuptools,
  termcolor,
  tzlocal,
}:

buildPythonPackage rec {
  pname = "aocd";
  version = "2.1.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "wimglenn";
    repo = "advent-of-code-data";
    tag = "v${version}";
    hash = "sha256-xR9CfyOUsKSSA/1zYi6kCK3oAaX6Kd625mKMWI+ZFMA=";
  };

  build-system = [ setuptools ];

  dependencies = [
    aocd-example-parser
    beautifulsoup4
    pebble
    python-dateutil
    requests
    rich # for example parser aoce. must either be here or checkInputs
    termcolor
    tzlocal
  ];

  nativeCheckInputs = [
    numpy
    pook
    pytest-freezegun
    pytest-mock
    pytest-raisin
    pytest-socket
    pytestCheckHook
    pytest-cov-stub
    requests-mock
  ];

  enabledTestPaths = [
    "tests/"
  ];

  pythonImportsCheck = [ "aocd" ];

  meta = {
    description = "Get your Advent of Code data with a single import statement";
    homepage = "https://github.com/wimglenn/advent-of-code-data";
    changelog = "https://github.com/wimglenn/advent-of-code-data/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ aadibajpai ];
    platforms = lib.platforms.unix;
  };
}