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