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