b5f92a349c
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
68 lines
1.3 KiB
Nix
68 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.5";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
pname = "mkdocs_jupyter";
|
|
inherit version;
|
|
hash = "sha256-+ngEh5pidwJJfir66kCj2xy90qOroORBd4LdJMqJm7M=";
|
|
};
|
|
|
|
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"
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|