1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 ipykernel,
7 ipython,
8 ipywidgets,
9 nbconvert,
10 nbformat,
11 pythonOlder,
12 sphinx,
13 pytestCheckHook,
14}:
15
16buildPythonPackage rec {
17 pname = "jupyter-sphinx";
18 version = "0.5.3";
19 pyproject = true;
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "jupyter";
25 repo = "jupyter-sphinx";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-o/i3WravKZPf7uw2H4SVYfAyaZGf19ZJlkmeHCWcGtE=";
28 };
29
30 nativeBuildInputs = [ hatchling ];
31
32 propagatedBuildInputs = [
33 ipykernel
34 ipython
35 ipywidgets
36 nbconvert
37 nbformat
38 sphinx
39 ];
40
41 pythonImportsCheck = [ "jupyter_sphinx" ];
42
43 env.JUPYTER_PLATFORM_DIRS = 1;
44
45 nativeCheckInputs = [ pytestCheckHook ];
46
47 preCheck = ''
48 export HOME=$TMPDIR
49 '';
50
51 __darwinAllowLocalNetworking = true;
52
53 meta = with lib; {
54 description = "Jupyter Sphinx Extensions";
55 homepage = "https://github.com/jupyter/jupyter-sphinx/";
56 changelog = "https://github.com/jupyter/jupyter-sphinx/releases/tag/${src.rev}";
57 license = licenses.bsd3;
58 };
59}