1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5, requests
6, pytestCheckHook
7, tzlocal
8, pytest-mock
9, pytest-freezegun
10, pytest-raisin
11, pytest-socket
12, requests-mock
13, pebble
14, python-dateutil
15, termcolor
16, beautifulsoup4
17, setuptools
18, pythonOlder
19}:
20
21buildPythonPackage rec {
22 pname = "aocd";
23 version = "1.3.2";
24 format = "setuptools";
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "wimglenn";
30 repo = "advent-of-code-data";
31 rev = "refs/tags/v${version}";
32 hash = "sha256-yY8ItXZZp0yVs4viJzduMPq8Q8NKd34uvlGaVUE2GjQ=";
33 };
34
35 propagatedBuildInputs = [
36 python-dateutil
37 requests
38 termcolor
39 beautifulsoup4
40 pebble
41 tzlocal
42 setuptools
43 ];
44
45 # Too many failing tests
46 preCheck = "rm pytest.ini";
47
48 disabledTests = [
49 "test_results"
50 "test_results_xmas"
51 "test_run_error"
52 "test_run_and_autosubmit"
53 "test_run_and_no_autosubmit"
54 "test_load_input_from_file"
55 ];
56
57 nativeCheckInputs = [
58 pytestCheckHook
59 pytest-mock
60 pytest-freezegun
61 pytest-raisin
62 pytest-socket
63 requests-mock
64 ];
65
66 pythonImportsCheck = [
67 "aocd"
68 ];
69
70 meta = with lib; {
71 description = "Get your Advent of Code data with a single import statement";
72 homepage = "https://github.com/wimglenn/advent-of-code-data";
73 changelog = "https://github.com/wimglenn/advent-of-code-data/releases/tag/v${version}";
74 license = licenses.mit;
75 maintainers = with maintainers; [ aadibajpai ];
76 platforms = platforms.unix;
77 };
78}