1{
2 # eval time deps
3 lib
4, buildPythonPackage
5, fetchFromGitHub
6, pythonOlder
7
8# buildtime
9, hatchling
10
11# runtime deps
12, click
13, ghp-import
14, importlib-metadata
15, jinja2
16, markdown
17, mergedeep
18, packaging
19, pyyaml
20, pyyaml-env-tag
21, watchdog
22
23# testing deps
24, babel
25, mock
26, unittestCheckHook
27}:
28
29buildPythonPackage rec {
30 pname = "mkdocs";
31 version = "1.4.2";
32 format = "pyproject";
33 disabled = pythonOlder "3.6";
34
35 src = fetchFromGitHub {
36 owner = pname;
37 repo = pname;
38 rev = "refs/tags/${version}";
39 hash = "sha256-/NxiKbCd2acYcNe5ww3voM9SGVE2IDqknngqApkDbNs=";
40 };
41
42 postPatch = ''
43 substituteInPlace pyproject.toml \
44 --replace "Markdown >=3.2.1, <3.4" "Markdown"
45 '';
46
47 nativeBuildInputs = [
48 hatchling
49 ];
50
51 propagatedBuildInputs = [
52 click
53 jinja2
54 markdown
55 mergedeep
56 pyyaml
57 pyyaml-env-tag
58 ghp-import
59 importlib-metadata
60 watchdog
61 packaging
62 ];
63
64 nativeCheckInputs = [
65 unittestCheckHook
66 babel
67 mock
68 ];
69
70 unittestFlagsArray = [ "-v" "-p" "'*tests.py'" "mkdocs" ];
71
72 pythonImportsCheck = [ "mkdocs" ];
73
74 meta = with lib; {
75 description = "Project documentation with Markdown / static website generator";
76 longDescription = ''
77 MkDocs is a fast, simple and downright gorgeous static site generator that's
78 geared towards building project documentation. Documentation source files
79 are written in Markdown, and configured with a single YAML configuration file.
80
81 MkDocs can also be used to generate general-purpose websites.
82 '';
83 homepage = "http://mkdocs.org/";
84 license = licenses.bsd2;
85 platforms = platforms.unix;
86 maintainers = with maintainers; [ rkoe ];
87 };
88}