summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/django-minify-html/default.nix
blob: f8dff2911d450f942f74a6cbcc1746b97379ed2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 ];
  };
}