depot/third_party/nixpkgs/pkgs/development/python-modules/mkdocs-jupyter/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

65 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
hatchling,
ipykernel,
jupytext,
mkdocs,
mkdocs-material,
nbconvert,
pygments,
pytestCheckHook,
pythonOlder,
pythonRelaxDepsHook,
}:
buildPythonPackage rec {
pname = "mkdocs-jupyter";
version = "0.24.6";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "mkdocs_jupyter";
inherit version;
hash = "sha256-ify+ipUjhk1UFt4aYHEWQLa8KXInnSrfRu0ndsLZ/3w=";
};
postPatch = ''
sed -i "/--cov/d" pyproject.toml
substituteInPlace src/mkdocs_jupyter/tests/test_base_usage.py \
--replace "[\"mkdocs\"," "[\"${mkdocs.out}/bin/mkdocs\","
'';
pythonRelaxDeps = [ "nbconvert" ];
nativeBuildInputs = [
hatchling
pythonRelaxDepsHook
];
propagatedBuildInputs = [
ipykernel
jupytext
mkdocs
mkdocs-material
nbconvert
pygments
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "mkdocs_jupyter" ];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Use Jupyter Notebook in mkdocs";
homepage = "https://github.com/danielfrg/mkdocs-jupyter";
changelog = "https://github.com/danielfrg/mkdocs-jupyter/blob/${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ net-mist ];
};
}