about summary refs log tree commit diff
path: root/pkgs/development/python-modules/nbclassic/default.nix
blob: 2c062d3ff99ec1cc43643cc31052bae1a7f25324 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, notebook
, pythonOlder
, jupyter_server
, pytestCheckHook
, pytest-tornasync
}:

buildPythonPackage rec {
  pname = "nbclassic";
  version = "0.3.5";
  disabled = pythonOlder "3.6";

  # tests only on github
  src = fetchFromGitHub {
    owner = "jupyterlab";
    repo = pname;
    rev = "v${version}";
    sha256 = "1d0x7nwsaw5qjw4iaylc2sxlpiq3hlg9sy3i2nh7sn3wckwl76lc";
  };

  propagatedBuildInputs = [ jupyter_server notebook ];

  preCheck = ''
    cd nbclassic
    mv conftest.py tests
    cd tests

    export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
  '';
  checkInputs = [
    pytestCheckHook
    pytest-tornasync
  ];

  __darwinAllowLocalNetworking = true;

  meta = with lib; {
    description = "Jupyter lab environment notebook server extension.";
    license = with licenses; [ bsd3 ];
    homepage = "https://github.com/jupyterlab/nbclassic";
    maintainers = [ maintainers.elohmeier ];
  };
}