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-comat.patch";
42 url = "https://github.com/celery/celery/commit/b260860988469ef8ad74f2d4225839c2fa91d590.patch";
43 hash = "sha256-NWB/UB0fE7A/vgMRYz6QGmqLmyN1ninAMyL4V2tpzto=";
44 })
45 ];
46
47 postPatch = ''
48 substituteInPlace requirements/default.txt \
49 --replace "billiard>=3.6.4.0,<4.0" "billiard>=3.6.4.0"
50 '';
51
52 propagatedBuildInputs = [
53 billiard
54 click
55 click-didyoumean
56 click-plugins
57 click-repl
58 kombu
59 pytz
60 vine
61 ];
62
63 checkInputs = [
64 boto3
65 case
66 dnspython
67 moto
68 pymongo
69 pytest-celery
70 pytest-subtests
71 pytest-timeout
72 pytestCheckHook
73 ];
74
75 disabledTestPaths = [
76 # test_eventlet touches network
77 "t/unit/concurrency/test_eventlet.py"
78 # test_multi tries to create directories under /var
79 "t/unit/bin/test_multi.py"
80 "t/unit/apps/test_multi.py"
81 ];
82
83 disabledTests = [
84 "msgpack"
85 "test_check_privileges_no_fchown"
86 ] ++ lib.optionals stdenv.isDarwin [
87 # too many open files on hydra
88 "test_cleanup"
89 "test_with_autoscaler_file_descriptor_safety"
90 "test_with_file_descriptor_safety"
91 ];
92
93 pythonImportsCheck = [
94 "celery"
95 ];
96
97 passthru.tests = {
98 inherit (nixosTests) sourcehut;
99 };
100
101 meta = with lib; {
102 description = "Distributed task queue";
103 homepage = "https://github.com/celery/celery/";
104 license = licenses.bsd3;
105 maintainers = with maintainers; [ fab ];
106 };
107}