summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/mkdocs-minify-plugin/default.nix
blob: cf2aaff7dab83c03c0ff23d578a79ff11c5b491e (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  mkdocs,
  csscompressor,
  htmlmin,
  jsmin,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "mkdocs-minify-plugin";
  version = "0.7.1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "byrnereese";
    repo = "mkdocs-minify-plugin";
    tag = version;
    hash = "sha256-LDCAWKVbFsa6Y/tmY2Zne4nOtxe4KvNplZuWxg4e4L8=";
  };

  propagatedBuildInputs = [
    csscompressor
    htmlmin
    jsmin
    mkdocs
  ];

  nativeCheckInputs = [
    mkdocs
    pytestCheckHook
  ];

  # Some tests fail with an assertion error failure
  doCheck = false;

  pythonImportsCheck = [ "mkdocs" ];

  meta = {
    description = "Mkdocs plugin to minify the HTML of a page before it is written to disk";
    homepage = "https://github.com/byrnereese/mkdocs-minify-plugin";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ tfc ];
  };
}