2023-03-30 22:05:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-10-06 18:32:54 +00:00
|
|
|
, fetchPypi
|
2023-03-30 22:05:00 +00:00
|
|
|
, hatchling
|
2022-10-06 18:32:54 +00:00
|
|
|
, ipykernel
|
|
|
|
, jupytext
|
|
|
|
, mkdocs
|
|
|
|
, mkdocs-material
|
|
|
|
, nbconvert
|
|
|
|
, pygments
|
|
|
|
, pytestCheckHook
|
2023-03-30 22:05:00 +00:00
|
|
|
, 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
|
|
|
'';
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"nbconvert"
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-06 18:32:54 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"mkdocs_jupyter"
|
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|