1{ lib, buildPythonPackage, fetchFromGitHub, six, django, fetchpatch }:
2buildPythonPackage rec {
3 pname = "django-appconf";
4 version = "1.0.3";
5
6 src = fetchFromGitHub {
7 owner = "django-compressor";
8 repo = "django-appconf";
9 rev = version;
10 sha256 = "06hwbz7362y0la9np3df25mms235fcqgpd2vn0mnf8dri9spzy1h";
11 };
12
13 propagatedBuildInputs = [ six django ];
14
15 patches = [
16 (fetchpatch {
17 name = "backport_django_2_2.patch";
18 url = "https://github.com/django-compressor/django-appconf/commit/1526a842ee084b791aa66c931b3822091a442853.patch";
19 sha256 = "1vl2s6vlf15089s8p4c3g4d5iqm8jva66bdw683r8440f80ixgmw";
20 })
21 ];
22
23 checkPhase = ''
24 # prove we're running tests against installed package, not build dir
25 rm -r appconf
26 python -m django test --settings="tests.test_settings"
27 '';
28
29 meta = with lib; {
30 description = "A helper class for handling configuration defaults of packaged apps gracefully";
31 homepage = "https://django-appconf.readthedocs.org/";
32 license = licenses.bsd2;
33 maintainers = with maintainers; [ desiderius ];
34 };
35}