2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
hatchling,
|
|
|
|
ipykernel,
|
|
|
|
jupytext,
|
|
|
|
mkdocs,
|
|
|
|
mkdocs-material,
|
|
|
|
nbconvert,
|
|
|
|
pygments,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pythonRelaxDepsHook,
|
2022-10-06 18:32:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mkdocs-jupyter";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.24.6";
|
2023-03-30 22:05:00 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2023-03-30 22:05:00 +00:00
|
|
|
pname = "mkdocs_jupyter";
|
|
|
|
inherit version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-ify+ipUjhk1UFt4aYHEWQLa8KXInnSrfRu0ndsLZ/3w=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-03-30 22:05:00 +00:00
|
|
|
sed -i "/--cov/d" pyproject.toml
|
2023-10-19 13:55:26 +00:00
|
|
|
substituteInPlace src/mkdocs_jupyter/tests/test_base_usage.py \
|
2023-03-30 22:05:00 +00:00
|
|
|
--replace "[\"mkdocs\"," "[\"${mkdocs.out}/bin/mkdocs\","
|
2022-10-06 18:32:54 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "nbconvert" ];
|
2023-03-30 22:05:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-03-30 22:05:00 +00:00
|
|
|
ipykernel
|
2022-10-06 18:32:54 +00:00
|
|
|
jupytext
|
|
|
|
mkdocs
|
|
|
|
mkdocs-material
|
2023-03-30 22:05:00 +00:00
|
|
|
nbconvert
|
2022-10-06 18:32:54 +00:00
|
|
|
pygments
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-10-06 18:32:54 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "mkdocs_jupyter" ];
|
2023-03-30 22:05:00 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Use Jupyter Notebook in mkdocs";
|
|
|
|
homepage = "https://github.com/danielfrg/mkdocs-jupyter";
|
2023-03-30 22:05:00 +00:00
|
|
|
changelog = "https://github.com/danielfrg/mkdocs-jupyter/blob/${version}/CHANGELOG.md";
|
2022-10-06 18:32:54 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ net-mist ];
|
|
|
|
};
|
|
|
|
}
|