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 python, 13}: 14 15buildPythonPackage rec { 16 pname = "django-tasks"; 17 version = "0.6.1"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "RealOrangeOne"; 22 repo = "django-tasks"; 23 tag = version; 24 hash = "sha256-MLztM4jVQV2tHPcIExbPGX+hCHSTqaQJeTbQqaVA3V4="; 25 }; 26 27 build-system = [ 28 setuptools 29 ]; 30 31 dependencies = [ 32 django 33 django-stubs-ext 34 typing-extensions 35 ]; 36 37 optional-dependencies = { 38 mysql = [ 39 mysqlclient 40 ]; 41 postgres = [ 42 psycopg 43 ]; 44 }; 45 46 pythonImportsCheck = [ "django_tasks" ]; 47 48 nativeCheckInputs = [ 49 dj-database-url 50 ]; 51 52 checkPhase = '' 53 runHook preCheck 54 55 export DJANGO_SETTINGS_MODULE="tests.settings" 56 ${python.interpreter} -m manage test --noinput 57 58 runHook postCheck 59 ''; 60 61 meta = { 62 description = "Reference implementation and backport of background workers and tasks in Django"; 63 homepage = "https://github.com/RealOrangeOne/django-tasks"; 64 changelog = "https://github.com/RealOrangeOne/django-tasks/releases/tag/${version}"; 65 license = lib.licenses.bsd3; 66 maintainers = with lib.maintainers; [ GaetanLepage ]; 67 }; 68}