2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, requests
|
|
|
|
, pytestCheckHook
|
|
|
|
, tzlocal
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-freezegun
|
|
|
|
, pytest-raisin
|
|
|
|
, pytest-socket
|
|
|
|
, requests-mock
|
|
|
|
, pebble
|
|
|
|
, python-dateutil
|
|
|
|
, termcolor
|
|
|
|
, beautifulsoup4
|
|
|
|
, setuptools
|
|
|
|
, pythonOlder
|
2021-12-26 17:43:05 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aocd";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "1.3.2";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-12-26 17:43:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wimglenn";
|
|
|
|
repo = "advent-of-code-data";
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-yY8ItXZZp0yVs4viJzduMPq8Q8NKd34uvlGaVUE2GjQ=";
|
2021-12-26 17:43:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"aocd"
|
|
|
|
];
|
2021-12-26 17:43:05 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Get your Advent of Code data with a single import statement";
|
2022-12-17 10:02:37 +00:00
|
|
|
homepage = "https://github.com/wimglenn/advent-of-code-data";
|
|
|
|
changelog = "https://github.com/wimglenn/advent-of-code-data/releases/tag/v${version}";
|
2021-12-26 17:43:05 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ aadibajpai ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|