1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, django
6, factory_boy
7, mock
8, pip
9, pygments
10, pytest-django
11, pytestCheckHook
12, shortuuid
13, vobject
14, werkzeug
15}:
16
17buildPythonPackage rec {
18 pname = "django-extensions";
19 version = "3.2.1";
20
21 src = fetchFromGitHub {
22 owner = pname;
23 repo = pname;
24 rev = "refs/tags/${version}";
25 hash = "sha256-i8A/FMba1Lc3IEBzefP3Uu23iGcDGYqo5bNv+u6hKQI=";
26 };
27
28 patches = [
29 (fetchpatch {
30 # pygments 2.14 compat for tests
31 url = "https://github.com/django-extensions/django-extensions/commit/61ebfe38f8fca9225b41bec5418e006e6a8815e1.patch";
32 hash = "sha256-+sxaQMmKi/S4IlfHqARPGhaqc+F1CXUHVFyeU/ArW2U=";
33 })
34 ];
35
36 postPatch = ''
37 substituteInPlace setup.cfg \
38 --replace "--cov=django_extensions --cov-report html --cov-report term" ""
39 '';
40
41 propagatedBuildInputs = [
42 django
43 ];
44
45 __darwinAllowLocalNetworking = true;
46
47 nativeCheckInputs = [
48 factory_boy
49 mock
50 pip
51 pygments # not explicitly declared in setup.py, but some tests require it
52 pytest-django
53 pytestCheckHook
54 shortuuid
55 vobject
56 werkzeug
57 ];
58
59 disabledTestPaths = [
60 # requires network access
61 "tests/management/commands/test_pipchecker.py"
62 ];
63
64 meta = with lib; {
65 description = "A collection of custom extensions for the Django Framework";
66 homepage = "https://github.com/django-extensions/django-extensions";
67 license = licenses.mit;
68 };
69}