1{ lib, stdenv, buildPythonPackage, fetchFromGitHub, requests
2, pytestCheckHook, tzlocal, pytest-mock, pytest-freezegun, pytest-raisin
3, pytest-socket, requests-mock, pebble, python-dateutil, termcolor
4, beautifulsoup4, setuptools
5}:
6
7buildPythonPackage rec {
8 pname = "aocd";
9 version = "1.1.3";
10
11 src = fetchFromGitHub {
12 owner = "wimglenn";
13 repo = "advent-of-code-data";
14 rev = "refs/tags/v${version}";
15 sha256 = "sha256-V6byleGCgXc2xfceb+aO0sYwGD6uThE6/8s5NDEjerw=";
16 };
17
18 propagatedBuildInputs = [
19 python-dateutil
20 requests
21 termcolor
22 beautifulsoup4
23 pebble
24 tzlocal
25 setuptools
26 ];
27
28 # Too many failing tests
29 preCheck = "rm pytest.ini";
30
31 disabledTests = [
32 "test_results"
33 "test_results_xmas"
34 "test_run_error"
35 "test_run_and_autosubmit"
36 "test_run_and_no_autosubmit"
37 "test_load_input_from_file"
38 ];
39
40 checkInputs = [
41 pytestCheckHook
42 pytest-mock
43 pytest-freezegun
44 pytest-raisin
45 pytest-socket
46 requests-mock
47 ];
48
49 pythonImportsCheck = [ "aocd" ];
50
51 meta = with lib; {
52 homepage = "https://github.com/wimglenn/advent-of-code-data";
53 description = "Get your Advent of Code data with a single import statement";
54 license = licenses.mit;
55 maintainers = with maintainers; [ aadibajpai ];
56 platforms = platforms.unix;
57 };
58}