1{ lib
2, buildPythonPackage
3, fetchPypi
4, git
5, jupyter-server
6, hatch-jupyter-builder
7, hatch-nodejs-version
8, hatchling
9, jupyterlab
10, nbdime
11, nbformat
12, pexpect
13, pytest-asyncio
14, pytest-jupyter
15, pytest-tornasync
16, pytestCheckHook
17, pythonOlder
18, traitlets
19}:
20
21buildPythonPackage rec {
22 pname = "jupyterlab-git";
23 version = "0.50.0rc0";
24 pyproject = true;
25
26 disabled = pythonOlder "3.8";
27
28 src = fetchPypi {
29 pname = "jupyterlab_git";
30 inherit version;
31 hash = "sha256-euo8j7jt6oUJfZMF3VnbuM4uhibv+eijiXPO4UwZCiU=";
32 };
33
34 nativeBuildInputs = [
35 hatch-jupyter-builder
36 hatch-nodejs-version
37 hatchling
38 jupyterlab
39 ];
40
41 propagatedBuildInputs = [
42 jupyter-server
43 nbdime
44 git
45 nbformat
46 pexpect
47 traitlets
48 ];
49
50 nativeCheckInputs = [
51 jupyterlab
52 pytest-asyncio
53 pytest-jupyter
54 pytest-tornasync
55 pytestCheckHook
56 ];
57
58 preCheck = ''
59 export HOME=$TMPDIR
60 '';
61
62 disabledTestPaths = [
63 "jupyterlab_git/tests/test_handlers.py"
64 # PyPI doesn't ship all required files for the tests
65 "jupyterlab_git/tests/test_config.py"
66 "jupyterlab_git/tests/test_integrations.py"
67 "jupyterlab_git/tests/test_remote.py"
68 "jupyterlab_git/tests/test_settings.py"
69 ];
70
71 disabledTests = [
72 "test_Git_get_nbdiff_file"
73 "test_Git_get_nbdiff_dict"
74 ];
75
76 pythonImportsCheck = [
77 "jupyterlab_git"
78 ];
79
80 __darwinAllowLocalNetworking = true;
81
82 meta = with lib; {
83 description = "Jupyter lab extension for version control with Git";
84 homepage = "https://github.com/jupyterlab/jupyterlab-git";
85 license = with licenses; [ bsd3 ];
86 maintainers = with maintainers; [ chiroptical ];
87 };
88}