Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch2, 6 7 # build-system 8 setuptools, 9 10 # dependencies 11 aiosmtpd, 12 django, 13 looseversion, 14 15 # tests 16 factory-boy, 17 mock, 18 pip, 19 pygments, 20 pytestCheckHook, 21 pytest-django, 22 shortuuid, 23 vobject, 24 werkzeug, 25}: 26 27buildPythonPackage rec { 28 pname = "django-extensions"; 29 version = "3.2.3"; 30 pyproject = true; 31 32 src = fetchFromGitHub { 33 owner = pname; 34 repo = pname; 35 rev = "refs/tags/${version}"; 36 hash = "sha256-A2+5FBv0IhTJPkwgd7je+B9Ac64UHJEa3HRBbWr2FxM="; 37 }; 38 39 patches = [ 40 (fetchpatch2 { 41 # Replace dead asyncore, smtp implementation with aiosmtpd 42 name = "django-extensions-aiosmtpd.patch"; 43 url = "https://github.com/django-extensions/django-extensions/commit/37d56c4a4704c823ac6a4ef7c3de4c0232ceee64.patch"; 44 hash = "sha256-49UeJQKO0epwY/7tqoiHgOXdgPcB/JBIZaCn3ulaHTg="; 45 }) 46 ]; 47 48 postPatch = '' 49 substituteInPlace setup.cfg \ 50 --replace-fail "--cov=django_extensions --cov-report html --cov-report term" "" 51 52 substituteInPlace django_extensions/management/commands/pipchecker.py \ 53 --replace-fail "from distutils.version" "from looseversion" 54 ''; 55 56 build-system = [ setuptools ]; 57 58 dependencies = [ 59 aiosmtpd 60 django 61 looseversion 62 ]; 63 64 __darwinAllowLocalNetworking = true; 65 66 nativeCheckInputs = [ 67 factory-boy 68 mock 69 pip 70 pygments # not explicitly declared in setup.py, but some tests require it 71 pytest-django 72 pytestCheckHook 73 shortuuid 74 vobject 75 werkzeug 76 ]; 77 78 disabledTests = [ 79 # Mismatch in expectation of exception message 80 "test_installed_apps_no_resolve_conflicts_function" 81 ]; 82 83 disabledTestPaths = [ 84 # requires network access 85 "tests/management/commands/test_pipchecker.py" 86 # django.db.utils.OperationalError: no such table: django_extensions_permmodel 87 "tests/test_dumpscript.py" 88 ]; 89 90 meta = with lib; { 91 description = "Collection of custom extensions for the Django Framework"; 92 homepage = "https://github.com/django-extensions/django-extensions"; 93 license = licenses.mit; 94 }; 95}