1{ lib
2, buildPythonPackage
3, fetchPypi
4, rcssmin
5, rjsmin
6, django-appconf
7, beautifulsoup4
8, brotli
9, pytestCheckHook
10, django-sekizai
11, pytest-django
12, csscompressor
13, calmjs
14, jinja2
15, python
16}:
17
18buildPythonPackage rec {
19 pname = "django-compressor";
20 version = "4.4";
21 format = "setuptools";
22
23 src = fetchPypi {
24 pname = "django_compressor";
25 inherit version;
26 hash = "sha256-GwrMnPup9pvDjnxB2psNcKILyVWHtkP/75YJz0YGT2c=";
27 };
28
29 propagatedBuildInputs = [
30 beautifulsoup4
31 calmjs
32 django-appconf
33 jinja2
34 rcssmin
35 rjsmin
36 ];
37
38 checkInputs = [
39 beautifulsoup4
40 brotli
41 csscompressor
42 django-sekizai
43 pytestCheckHook
44 pytest-django
45 ];
46
47 # Getting error: compressor.exceptions.OfflineGenerationError: You have
48 # offline compression enabled but key "..." is missing from offline manifest.
49 # You may need to run "python manage.py compress"
50 disabledTestPaths = [
51 "compressor/tests/test_offline.py"
52 ];
53
54 pythonImportsCheck = [ "compressor" ];
55
56 DJANGO_SETTINGS_MODULE = "compressor.test_settings";
57
58 meta = with lib; {
59 description = "Compresses linked and inline JavaScript or CSS into single cached files";
60 homepage = "https://django-compressor.readthedocs.org/";
61 changelog = "https://github.com/django-compressor/django-compressor/blob/${version}/docs/changelog.txt";
62 license = licenses.mit;
63 maintainers = with maintainers; [ desiderius ];
64 };
65}