nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aocd-example-parser,
4 beautifulsoup4,
5 buildPythonPackage,
6 fetchFromGitHub,
7 numpy,
8 pebble,
9 pook,
10 pytest-freezegun,
11 pytest-mock,
12 pytest-cov-stub,
13 pytest-raisin,
14 pytest-socket,
15 pytestCheckHook,
16 python-dateutil,
17 requests,
18 requests-mock,
19 rich,
20 setuptools,
21 termcolor,
22 tzlocal,
23}:
24
25buildPythonPackage rec {
26 pname = "aocd";
27 version = "2.2.0";
28 pyproject = true;
29
30 src = fetchFromGitHub {
31 owner = "wimglenn";
32 repo = "advent-of-code-data";
33 tag = "v${version}";
34 hash = "sha256-Oe+9Ur5O2GSRY7qB8oja7quJqEX/0yXKh4R5+N4kv7Q=";
35 };
36
37 build-system = [ setuptools ];
38
39 dependencies = [
40 aocd-example-parser
41 beautifulsoup4
42 pebble
43 python-dateutil
44 requests
45 rich # for example parser aoce. must either be here or checkInputs
46 termcolor
47 tzlocal
48 ];
49
50 nativeCheckInputs = [
51 numpy
52 pook
53 pytest-freezegun
54 pytest-mock
55 pytest-raisin
56 pytest-socket
57 pytestCheckHook
58 pytest-cov-stub
59 requests-mock
60 ];
61
62 enabledTestPaths = [
63 "tests/"
64 ];
65
66 pythonImportsCheck = [ "aocd" ];
67
68 meta = {
69 description = "Get your Advent of Code data with a single import statement";
70 homepage = "https://github.com/wimglenn/advent-of-code-data";
71 changelog = "https://github.com/wimglenn/advent-of-code-data/releases/tag/${src.tag}";
72 license = lib.licenses.mit;
73 maintainers = with lib.maintainers; [ aadibajpai ];
74 platforms = lib.platforms.unix;
75 };
76}