nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 gevent,
7 pytest-asyncio,
8 pytest-cov-stub,
9 pytest-tornado,
10 pytest8_3CheckHook,
11 pytz,
12 setuptools,
13 setuptools-scm,
14 tornado,
15 twisted,
16 tzlocal,
17}:
18
19buildPythonPackage rec {
20 pname = "apscheduler";
21 version = "3.11.2";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "agronholm";
26 repo = "apscheduler";
27 tag = version;
28 hash = "sha256-AhVlACRg0Xwy9XmFRl29of5uM2aJa5Gv2SzFuJXVCpE=";
29 };
30
31 postPatch = ''
32 sed -i "/addopts/d" pyproject.toml
33 '';
34
35 build-system = [
36 setuptools
37 setuptools-scm
38 ];
39
40 dependencies = [
41 tzlocal
42 ];
43
44 nativeCheckInputs = [
45 gevent
46 pytest-asyncio
47 pytest-cov-stub
48 pytest-tornado
49 pytest8_3CheckHook
50 pytz
51 tornado
52 twisted
53 ];
54
55 disabledTests = [
56 "test_broken_pool"
57 # gevent tests have issue on newer Python releases
58 "test_add_live_job"
59 "test_add_pending_job"
60 "test_shutdown"
61 ]
62 ++ lib.optionals stdenv.hostPlatform.isDarwin [
63 "test_submit_job"
64 "test_max_instances"
65 ];
66
67 pythonImportsCheck = [ "apscheduler" ];
68
69 meta = {
70 changelog = "https://github.com/agronholm/apscheduler/releases/tag/${src.tag}";
71 description = "Library that lets you schedule your Python code to be executed";
72 homepage = "https://github.com/agronholm/apscheduler";
73 license = lib.licenses.mit;
74 maintainers = [ ];
75 };
76}