at 24.11-pre 2.1 kB view raw
1{ 2 # eval time deps 3 lib, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pythonAtLeast, 7 pythonOlder, 8 9 # buildtime 10 hatchling, 11 12 # runtime deps 13 click, 14 ghp-import, 15 importlib-metadata, 16 jinja2, 17 markdown, 18 markupsafe, 19 mergedeep, 20 packaging, 21 pathspec, 22 platformdirs, 23 pyyaml, 24 pyyaml-env-tag, 25 watchdog, 26 27 # optional-dependencies 28 babel, 29 setuptools, 30 31 # testing deps 32 mock, 33 unittestCheckHook, 34}: 35 36buildPythonPackage rec { 37 pname = "mkdocs"; 38 version = "1.5.3"; 39 pyproject = true; 40 41 disabled = pythonOlder "3.7"; 42 43 src = fetchFromGitHub { 44 owner = pname; 45 repo = pname; 46 rev = "refs/tags/${version}"; 47 hash = "sha256-axH4AeL+osxoUIVJbW6YjiTfUr6TAXMB4raZ3oO0fyw="; 48 }; 49 50 nativeBuildInputs = [ hatchling ]; 51 52 propagatedBuildInputs = [ 53 click 54 ghp-import 55 jinja2 56 markdown 57 markupsafe 58 mergedeep 59 packaging 60 pathspec 61 platformdirs 62 pyyaml 63 pyyaml-env-tag 64 watchdog 65 ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; 66 67 passthru.optional-dependencies = { 68 i18n = [ babel ] ++ lib.optionals (pythonAtLeast "3.12") [ setuptools ]; 69 }; 70 71 nativeCheckInputs = [ 72 unittestCheckHook 73 mock 74 ] ++ passthru.optional-dependencies.i18n; 75 76 unittestFlagsArray = [ 77 "-v" 78 "-p" 79 "'*tests.py'" 80 "mkdocs" 81 ]; 82 83 pythonImportsCheck = [ "mkdocs" ]; 84 85 meta = with lib; { 86 changelog = "https://github.com/mkdocs/mkdocs/releases/tag/${version}"; 87 description = "Project documentation with Markdown / static website generator"; 88 mainProgram = "mkdocs"; 89 downloadPage = "https://github.com/mkdocs/mkdocs"; 90 longDescription = '' 91 MkDocs is a fast, simple and downright gorgeous static site generator that's 92 geared towards building project documentation. Documentation source files 93 are written in Markdown, and configured with a single YAML configuration file. 94 95 MkDocs can also be used to generate general-purpose websites. 96 ''; 97 homepage = "http://mkdocs.org/"; 98 license = licenses.bsd2; 99 platforms = platforms.unix; 100 maintainers = with maintainers; [ rkoe ]; 101 }; 102}