From 22080b7dc0fd3e0c8ef2f65b12ba1a22125600d1 Mon Sep 17 00:00:00 2001 From: Sebastien Iooss Date: Mon, 3 Oct 2022 09:55:36 +0200 Subject: [PATCH] python3Packages.mkdocs-jupyter: init at 0.22.0 --- .../python-modules/mkdocs-jupyter/default.nix | 50 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 1 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/mkdocs-jupyter/default.nix diff --git a/pkgs/development/python-modules/mkdocs-jupyter/default.nix b/pkgs/development/python-modules/mkdocs-jupyter/default.nix new file mode 100644 index 000000000000..2c9b85e64e0b --- /dev/null +++ b/pkgs/development/python-modules/mkdocs-jupyter/default.nix @@ -0,0 +1,50 @@ +{ buildPythonPackage +, fetchPypi +, ipykernel +, jupytext +, lib +, mkdocs +, mkdocs-material +, nbconvert +, pygments +, pytestCheckHook +, pytest-cov +}: + +buildPythonPackage rec { + pname = "mkdocs-jupyter"; + version = "0.22.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-WFzGm+pMufr2iYExl43JqbIlCR7UtghPWrZWUqXhIYU="; + }; + + postPatch = '' + substituteInPlace mkdocs_jupyter/tests/test_base_usage.py \ + --replace "[\"mkdocs\"," "[\"${mkdocs.out}/bin/mkdocs\"," + ''; + + propagatedBuildInputs = [ + nbconvert + jupytext + mkdocs + mkdocs-material + pygments + ipykernel + ]; + + pythonImportsCheck = [ "mkdocs_jupyter" ]; + + checkInputs = [ + pytest-cov + pytestCheckHook + ]; + + meta = with lib; { + description = "Use Jupyter Notebook in mkdocs"; + homepage = "https://github.com/danielfrg/mkdocs-jupyter"; + license = licenses.asl20; + maintainers = with maintainers; [ net-mist ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4336b1767bc7..3cb075cd8f58 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5760,6 +5760,7 @@ in { mkdocs-autorefs = callPackage ../development/python-modules/mkdocs-autorefs { }; mkdocs-drawio-exporter = callPackage ../development/python-modules/mkdocs-drawio-exporter { }; mkdocs-exclude = callPackage ../development/python-modules/mkdocs-exclude { }; + mkdocs-jupyter = callPackage ../development/python-modules/mkdocs-jupyter { }; mkdocs-gitlab = callPackage ../development/python-modules/mkdocs-gitlab-plugin { }; mkdocs-macros = callPackage ../development/python-modules/mkdocs-macros { }; mkdocs-material = callPackage ../development/python-modules/mkdocs-material { };