1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 python-dateutil,
7 celery,
8 redis,
9 tenacity,
10 pytestCheckHook,
11 pytz,
12 fakeredis,
13 mock,
14}:
15
16buildPythonPackage rec {
17 pname = "celery-redbeat";
18 version = "2.1.0";
19 format = "setuptools";
20
21 src = fetchFromGitHub {
22 owner = "sibson";
23 repo = "redbeat";
24 rev = "v${version}";
25 hash = "sha256-WW/OYa7TWEKkata1eULir29wHaCnavBJebn4GrBzmWY=";
26 };
27
28 patches = [
29 (fetchpatch {
30 # celery 5.3.0 support
31 url = "https://github.com/sibson/redbeat/commit/4240e17172a4d9d2744d5c4da3cfca0e0a024e2e.patch";
32 hash = "sha256-quEfSFhv0sIpsKHX1CpFhbMC8LYXA8NASWYU8MMYPSk=";
33 })
34 ];
35
36 propagatedBuildInputs = [
37 celery
38 python-dateutil
39 redis
40 tenacity
41 ];
42
43 nativeCheckInputs = [
44 fakeredis
45 mock
46 pytestCheckHook
47 pytz
48 ];
49
50 pythonImportsCheck = [ "redbeat" ];
51
52 meta = with lib; {
53 description = "Database-backed Periodic Tasks";
54 homepage = "https://github.com/celery/django-celery-beat";
55 license = licenses.bsd3;
56 maintainers = with maintainers; [ onny ];
57 };
58}