2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonRelaxDepsHook,
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
setuptools,
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
calmjs,
|
|
|
|
django-appconf,
|
|
|
|
jinja2,
|
|
|
|
rcssmin,
|
|
|
|
rjsmin,
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
beautifulsoup4,
|
|
|
|
brotli,
|
|
|
|
csscompressor,
|
|
|
|
django-sekizai,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-django,
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-compressor";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "4.4";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "django_compressor";
|
|
|
|
inherit version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-GwrMnPup9pvDjnxB2psNcKILyVWHtkP/75YJz0YGT2c=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"rcssmin"
|
|
|
|
"rjsmin"
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-07-15 17:15:38 +00:00
|
|
|
beautifulsoup4
|
|
|
|
calmjs
|
|
|
|
django-appconf
|
|
|
|
jinja2
|
2022-08-12 12:06:08 +00:00
|
|
|
rcssmin
|
|
|
|
rjsmin
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
env.DJANGO_SETTINGS_MODULE = "compressor.test_settings";
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
beautifulsoup4
|
|
|
|
brotli
|
2023-07-15 17:15:38 +00:00
|
|
|
csscompressor
|
|
|
|
django-sekizai
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
pytest-django
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# Getting error: compressor.exceptions.OfflineGenerationError: You have
|
|
|
|
# offline compression enabled but key "..." is missing from offline manifest.
|
|
|
|
# You may need to run "python manage.py compress"
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTestPaths = [ "compressor/tests/test_offline.py" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "compressor" ];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Compresses linked and inline JavaScript or CSS into single cached files";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://django-compressor.readthedocs.org/";
|
|
|
|
changelog = "https://github.com/django-compressor/django-compressor/blob/${version}/docs/changelog.txt";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ desiderius ];
|
|
|
|
};
|
|
|
|
}
|