depot/third_party/nixpkgs/pkgs/development/python-modules/mkdocs-material/default.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

99 lines
1.8 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
# build-system
, hatch-requirements-txt
, hatch-nodejs-version
, hatchling
, trove-classifiers
# dependencies
, babel
, colorama
, jinja2
, markdown
, mkdocs
, mkdocs-material-extensions
, paginate
, pygments
, pymdown-extensions
, pythonOlder
, regex
, requests
# optional-dependencies
, mkdocs-minify-plugin
, mkdocs-redirects
, mkdocs-git-revision-date-localized-plugin
, pillow
, cairosvg
}:
buildPythonPackage rec {
pname = "mkdocs-material";
version = "9.5.6";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "squidfunk";
repo = "mkdocs-material";
rev = "refs/tags/${version}";
hash = "sha256-t+kS/MZ6kfga+LPSBj0h+vkY/u/bd3iqRUyOHXfrwDU=";
};
nativeBuildInputs = [
hatch-requirements-txt
hatch-nodejs-version
hatchling
trove-classifiers
];
propagatedBuildInputs = [
babel
colorama
jinja2
markdown
mkdocs
mkdocs-material-extensions
paginate
pygments
pymdown-extensions
regex
requests
];
passthru.optional-dependencies = {
recommended = [
mkdocs-minify-plugin
mkdocs-redirects
# TODO: mkdocs-rss-plugin
];
git = [
# TODO: gmkdocs-git-committers-plugin
mkdocs-git-revision-date-localized-plugin
];
imaging = [
cairosvg
pillow
];
};
# No tests for python
doCheck = false;
pythonImportsCheck = [
"mkdocs"
];
meta = with lib; {
changelog = "https://github.com/squidfunk/mkdocs-material/blob/${src.rev}/CHANGELOG";
description = "Material for mkdocs";
downloadPage = "https://github.com/squidfunk/mkdocs-material";
homepage = "https://squidfunk.github.io/mkdocs-material/";
license = licenses.mit;
maintainers = with maintainers; [ dandellion ];
};
}