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 tag = "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 disabledTests = [
48 # https://github.com/jupyter/jupyter-sphinx/issues/280"
49 "test_builder_priority"
50 ];
51
52 preCheck = ''
53 export HOME=$TMPDIR
54 '';
55
56 __darwinAllowLocalNetworking = true;
57
58 meta = with lib; {
59 description = "Jupyter Sphinx Extensions";
60 homepage = "https://github.com/jupyter/jupyter-sphinx/";
61 changelog = "https://github.com/jupyter/jupyter-sphinx/releases/tag/v${version}";
62 license = licenses.bsd3;
63 };
64}