summary refs log tree commit diff
path: root/pkgs/development/python-modules/lektor/default.nix
blob: 74fecc7f0e5336bc3d18c6e0fecc06853c658057 (plain) (blame)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{ lib
, babel
, buildPythonPackage
, click
, deprecated
, exifread
, fetchFromGitHub
, filetype
, flask
, importlib-metadata
, inifile
, jinja2
, marshmallow
, marshmallow-dataclass
, mistune
, pip
, pyopenssl
, pytest-click
, pytest-mock
, pytest-pylint
, pytestCheckHook
, pythonOlder
, python-slugify
, requests
, setuptools
, typing-inspect
, watchdog
, werkzeug
}:

buildPythonPackage rec {
  pname = "lektor";
  version = "3.4.0b2";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "lektor";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-5w3tT0celHgjmLlsM3sdBdYlXx57z3kMePVGSQkOP7M=";
  };

  propagatedBuildInputs = [
    babel
    click
    deprecated
    exifread
    filetype
    flask
    inifile
    jinja2
    marshmallow
    marshmallow-dataclass
    mistune
    pip
    pyopenssl
    python-slugify
    requests
    setuptools
    typing-inspect
    watchdog
    werkzeug
  ] ++ lib.optionals (pythonOlder "3.8") [
    importlib-metadata
  ];

  checkInputs = [
    pytest-click
    pytest-mock
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace "typing.inspect < 0.8.0" "typing.inspect"
  '';

  pythonImportsCheck = [
    "lektor"
  ];

  disabledTests = [
    # Test requires network access
    "test_path_installed_plugin_is_none"
  ];

  meta = with lib; {
    description = "A static content management system";
    homepage = "https://www.getlektor.com/";
    license = licenses.bsd0;
    maintainers = with maintainers; [ costrouc ];
  };
}