1{ stdenv
2, lib
3, billiard
4, boto3
5, buildPythonPackage
6, case
7, click
8, click-didyoumean
9, click-plugins
10, click-repl
11, dnspython
12, fetchPypi
13, fetchpatch
14, kombu
15, moto
16, pymongo
17, pytest-celery
18, pytest-subtests
19, pytest-timeout
20, pytestCheckHook
21, pythonOlder
22, pytz
23, vine
24, nixosTests
25}:
26
27buildPythonPackage rec {
28 pname = "celery";
29 version = "5.2.7";
30 format = "setuptools";
31
32 disabled = pythonOlder "3.7";
33
34 src = fetchPypi {
35 inherit pname version;
36 hash = "sha256-+vvYKTTTD4oAT4Ho96Bi4xQToj1ES+juMyZVORWVjG0=";
37 };
38
39 patches = [
40 (fetchpatch {
41 name = "billiard-4.0-compat.patch";
42 url = "https://github.com/celery/celery/commit/b260860988469ef8ad74f2d4225839c2fa91d590.patch";
43 hash = "sha256-NWB/UB0fE7A/vgMRYz6QGmqLmyN1ninAMyL4V2tpzto=";
44 })
45 (fetchpatch {
46 name = "billiard-4.1-compat.patch";
47 url = "https://github.com/celery/celery/pull/7781/commits/879af6341974c3778077d8212d78f093b2d77a4f.patch";
48 hash = "sha256-+m8/YkeAPPjwm0WF7dw5XZzf7MImVBLXT0/FS+fk0FE=";
49 })
50 ];
51
52 postPatch = ''
53 substituteInPlace requirements/default.txt \
54 --replace "billiard>=3.6.4.0,<4.0" "billiard>=3.6.4.0"
55 '';
56
57 propagatedBuildInputs = [
58 billiard
59 click
60 click-didyoumean
61 click-plugins
62 click-repl
63 kombu
64 pytz
65 vine
66 ];
67
68 nativeCheckInputs = [
69 boto3
70 case
71 dnspython
72 moto
73 pymongo
74 pytest-celery
75 pytest-subtests
76 pytest-timeout
77 pytestCheckHook
78 ];
79
80 disabledTestPaths = [
81 # test_eventlet touches network
82 "t/unit/concurrency/test_eventlet.py"
83 # test_multi tries to create directories under /var
84 "t/unit/bin/test_multi.py"
85 "t/unit/apps/test_multi.py"
86 ];
87
88 disabledTests = [
89 "msgpack"
90 "test_check_privileges_no_fchown"
91 ] ++ lib.optionals stdenv.isDarwin [
92 # too many open files on hydra
93 "test_cleanup"
94 "test_with_autoscaler_file_descriptor_safety"
95 "test_with_file_descriptor_safety"
96 ];
97
98 pythonImportsCheck = [
99 "celery"
100 ];
101
102 passthru.tests = {
103 inherit (nixosTests) sourcehut;
104 };
105
106 meta = with lib; {
107 description = "Distributed task queue";
108 homepage = "https://github.com/celery/celery/";
109 license = licenses.bsd3;
110 maintainers = with maintainers; [ fab ];
111 };
112}