Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 django, 7 django-stubs-ext, 8 typing-extensions, 9 mysqlclient, 10 psycopg, 11 dj-database-url, 12 django-rq, 13 fakeredis, 14 pytestCheckHook, 15 pytest-django, 16}: 17 18buildPythonPackage rec { 19 pname = "django-tasks"; 20 version = "0.7.0"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "RealOrangeOne"; 25 repo = "django-tasks"; 26 tag = version; 27 hash = "sha256-AWsqAvn11uklrFXtiV2a6fR3owZ02osEzrdHZgDKkOM="; 28 }; 29 30 build-system = [ 31 setuptools 32 ]; 33 34 dependencies = [ 35 django 36 django-stubs-ext 37 typing-extensions 38 ]; 39 40 optional-dependencies = { 41 mysql = [ 42 mysqlclient 43 ]; 44 postgres = [ 45 psycopg 46 ]; 47 }; 48 49 pythonImportsCheck = [ "django_tasks" ]; 50 51 nativeCheckInputs = [ 52 dj-database-url 53 django-rq 54 fakeredis 55 pytestCheckHook 56 pytest-django 57 ]; 58 59 disabledTests = [ 60 # AssertionError: Lists differ: [] != ['Starting worker for queues=default', ... 61 "test_verbose_logging" 62 # AssertionError: '' != 'Deleted 0 task result(s)' 63 "test_doesnt_prune_new_task" 64 # AssertionError: '' != 'Would delete 1 task result(s)' 65 "test_dry_run" 66 # AssertionError: '' != 'Deleted 1 task result(s)' 67 "test_prunes_tasks" 68 ]; 69 70 preCheck = '' 71 export DJANGO_SETTINGS_MODULE="tests.settings" 72 ''; 73 74 meta = { 75 description = "Reference implementation and backport of background workers and tasks in Django"; 76 homepage = "https://github.com/RealOrangeOne/django-tasks"; 77 changelog = "https://github.com/RealOrangeOne/django-tasks/releases/tag/${version}"; 78 license = lib.licenses.bsd3; 79 maintainers = with lib.maintainers; [ GaetanLepage ]; 80 }; 81}