about summary refs log tree commit diff
path: root/pkgs/development/python-modules/aocd/default.nix
blob: 303a57da19daedf6c1dde1f8be514ab4e0e8d54d (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, stdenv, buildPythonPackage, fetchFromGitHub, requests
, pytestCheckHook, tzlocal, pytest-mock, pytest-freezegun, pytest-raisin
, pytest-socket, requests-mock, pebble, python-dateutil, termcolor
, beautifulsoup4, setuptools
}:

buildPythonPackage rec {
  pname = "aocd";
  version = "1.2.3";

  src = fetchFromGitHub {
    owner = "wimglenn";
    repo = "advent-of-code-data";
    rev = "refs/tags/v${version}";
    sha256 = "sha256-//f/VWrTKukpNea8xprGQ7jobw10g5MQnnuM6/bAcGw=";
  };

  propagatedBuildInputs = [
    python-dateutil
    requests
    termcolor
    beautifulsoup4
    pebble
    tzlocal
    setuptools
  ];

  # Too many failing tests
  preCheck = "rm pytest.ini";

  disabledTests = [
    "test_results"
    "test_results_xmas"
    "test_run_error"
    "test_run_and_autosubmit"
    "test_run_and_no_autosubmit"
    "test_load_input_from_file"
  ];

  checkInputs = [
    pytestCheckHook
    pytest-mock
    pytest-freezegun
    pytest-raisin
    pytest-socket
    requests-mock
  ];

  pythonImportsCheck = [ "aocd" ];

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