diff --git a/pkgs/development/python-modules/django-minify-html/default.nix b/pkgs/development/python-modules/django-minify-html/default.nix new file mode 100644 index 000000000000..f8dff2911d45 --- /dev/null +++ b/pkgs/development/python-modules/django-minify-html/default.nix @@ -0,0 +1,61 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + setuptools, + + # dependencies + asgiref, + django, + minify-html, + + # tests + pytest-django, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "django-minify-html"; + version = "1.14.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "adamchainz"; + repo = "django-minify-html"; + tag = version; + hash = "sha256-mTFHIZo1E9+d7bOfelFCUZRt5eEo6w+xKB5qf9jc8hY="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + asgiref + django + minify-html + ]; + + nativeCheckInputs = [ + pytest-django + pytestCheckHook + ]; + + preCheck = '' + export DJANGO_SETTINGS_MODULE=tests.settings + ''; + + pythonImportsCheck = [ + "django_minify_html" + ]; + + meta = { + description = "Use minify-html, the extremely fast HTML + JS + CSS minifier, with Django"; + homepage = "https://github.com/adamchainz/django-minify-html"; + changelog = "https://github.com/adamchainz/django-minify-html/blob/${src.rev}/CHANGELOG.rst"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e1bba01f0de6..91a4705309ff 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4129,6 +4129,8 @@ self: super: with self; { django-mfa3 = callPackage ../development/python-modules/django-mfa3 { }; + django-minify-html = callPackage ../development/python-modules/django-minify-html { }; + django-model-utils = callPackage ../development/python-modules/django-model-utils { }; django-modelcluster = callPackage ../development/python-modules/django-modelcluster { };