1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 calmjs, 11 django-appconf, 12 jinja2, 13 rcssmin, 14 rjsmin, 15 16 # tests 17 beautifulsoup4, 18 brotli, 19 csscompressor, 20 django-sekizai, 21 pytestCheckHook, 22 pytest-django, 23 24}: 25 26buildPythonPackage rec { 27 pname = "django-compressor"; 28 version = "4.5.1"; 29 pyproject = true; 30 31 src = fetchPypi { 32 pname = "django_compressor"; 33 inherit version; 34 hash = "sha256-wdikii7k2LfyPEEeucl+LYjbGKGLocnoF41fW4NmqCI="; 35 }; 36 37 patches = [ 38 # https://github.com/django-compressor/django-compressor/issues/1279 39 # https://github.com/django-compressor/django-compressor/pull/1296 40 ./bs4-4.13-compat.patch 41 ]; 42 43 build-system = [ 44 setuptools 45 ]; 46 47 pythonRelaxDeps = [ 48 "rcssmin" 49 "rjsmin" 50 ]; 51 52 dependencies = [ 53 beautifulsoup4 54 calmjs 55 django-appconf 56 jinja2 57 rcssmin 58 rjsmin 59 ]; 60 61 env.DJANGO_SETTINGS_MODULE = "compressor.test_settings"; 62 63 nativeCheckInputs = [ 64 beautifulsoup4 65 brotli 66 csscompressor 67 django-sekizai 68 pytestCheckHook 69 pytest-django 70 ]; 71 72 # Getting error: compressor.exceptions.OfflineGenerationError: You have 73 # offline compression enabled but key "..." is missing from offline manifest. 74 # You may need to run "python manage.py compress" 75 disabledTestPaths = [ "compressor/tests/test_offline.py" ]; 76 77 pythonImportsCheck = [ "compressor" ]; 78 79 meta = with lib; { 80 description = "Compresses linked and inline JavaScript or CSS into single cached files"; 81 homepage = "https://django-compressor.readthedocs.org/"; 82 changelog = "https://github.com/django-compressor/django-compressor/blob/${version}/docs/changelog.txt"; 83 license = licenses.mit; 84 }; 85}