diff --git a/pkgs/development/python-modules/mkdocs-git-revision-date-localized-plugin/default.nix b/pkgs/development/python-modules/mkdocs-git-revision-date-localized-plugin/default.nix new file mode 100644 index 000000000000..1bc335fdbace --- /dev/null +++ b/pkgs/development/python-modules/mkdocs-git-revision-date-localized-plugin/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, gitpython +, mkdocs +, pytz +, pytestCheckHook +, git +}: + +buildPythonPackage rec { + pname = "mkdocs-git-revision-date-localized-plugin"; + version = "1.2.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "timvink"; + repo = "mkdocs-git-revision-date-localized-plugin"; + rev = "v${version}" ; + hash = "sha256-l7NUmsdd1FHkbdqtRcMQBfplZJgLCXrN+QuYaQLpz0k="; + }; + + propagatedBuildInputs = [ + gitpython + mkdocs + pytz + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + disabledTestPaths = [ + "tests/test_builds.py" + ]; + + pythonImportsCheck = [ "mkdocs_git_revision_date_localized_plugin" ]; + + meta = with lib; { + description = "MkDocs plugin that enables displaying the date of the last git modification of a page"; + homepage = "https://github.com/timvink/mkdocs-git-revision-date-localized-plugin"; + changelog = "https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ totoroot ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 31918ecb4d8a..d4bb7f8cfc43 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6555,6 +6555,7 @@ self: super: with self; { mkdocs-jupyter = callPackage ../development/python-modules/mkdocs-jupyter { }; mkdocs-gitlab = callPackage ../development/python-modules/mkdocs-gitlab-plugin { }; mkdocs-git-authors-plugin = callPackage ../development/python-modules/mkdocs-git-authors-plugin { }; + mkdocs-git-revision-date-localized-plugin = callPackage ../development/python-modules/mkdocs-git-revision-date-localized-plugin { }; mkdocs-linkcheck = callPackage ../development/python-modules/mkdocs-linkcheck { }; mkdocs-macros = callPackage ../development/python-modules/mkdocs-macros { }; mkdocs-material = callPackage ../development/python-modules/mkdocs-material { };