nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 ipykernel,
7 ipython,
8 ipywidgets,
9 nbconvert,
10 nbformat,
11 sphinx,
12 pytestCheckHook,
13}:
14
15buildPythonPackage rec {
16 pname = "jupyter-sphinx";
17 version = "0.5.3";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "jupyter";
22 repo = "jupyter-sphinx";
23 tag = "v${version}";
24 hash = "sha256-o/i3WravKZPf7uw2H4SVYfAyaZGf19ZJlkmeHCWcGtE=";
25 };
26
27 nativeBuildInputs = [ hatchling ];
28
29 propagatedBuildInputs = [
30 ipykernel
31 ipython
32 ipywidgets
33 nbconvert
34 nbformat
35 sphinx
36 ];
37
38 pythonImportsCheck = [ "jupyter_sphinx" ];
39
40 env.JUPYTER_PLATFORM_DIRS = 1;
41
42 nativeCheckInputs = [ pytestCheckHook ];
43
44 disabledTests = [
45 # https://github.com/jupyter/jupyter-sphinx/issues/280
46 "test_builder_priority"
47 ];
48
49 pytestFlags = [
50 # https://github.com/jupyter/jupyter-sphinx/issues/287
51 "-Wignore::sphinx.deprecation.RemovedInSphinx11Warning"
52 ];
53
54 preCheck = ''
55 export HOME=$TMPDIR
56 '';
57
58 __darwinAllowLocalNetworking = true;
59
60 meta = {
61 description = "Jupyter Sphinx Extensions";
62 homepage = "https://github.com/jupyter/jupyter-sphinx/";
63 changelog = "https://github.com/jupyter/jupyter-sphinx/releases/tag/v${version}";
64 license = lib.licenses.bsd3;
65 };
66}