81 lines
1.7 KiB
Nix
81 lines
1.7 KiB
Nix
{ stdenv
|
|
, lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, argon2_cffi
|
|
, nose
|
|
, nose_warnings_filters
|
|
, glibcLocales
|
|
, isPy3k
|
|
, mock
|
|
, jinja2
|
|
, tornado
|
|
, ipython_genutils
|
|
, traitlets
|
|
, jupyter
|
|
, jupyter_core
|
|
, jupyter_client
|
|
, nbformat
|
|
, nbconvert
|
|
, ipykernel
|
|
, terminado
|
|
, requests
|
|
, send2trash
|
|
, pexpect
|
|
, prometheus_client
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "notebook";
|
|
version = "6.1.3";
|
|
disabled = !isPy3k;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "9990d51b9931a31e681635899aeb198b4c4b41586a9e87fbfaaed1a71d0a05b6";
|
|
};
|
|
|
|
LC_ALL = "en_US.utf8";
|
|
|
|
checkInputs = [ nose pytestCheckHook glibcLocales ]
|
|
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
|
|
|
|
propagatedBuildInputs = [
|
|
jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
|
|
jupyter_client nbformat nbconvert ipykernel terminado requests pexpect
|
|
prometheus_client argon2_cffi
|
|
];
|
|
|
|
# disable warning_filters
|
|
preCheck = lib.optionalString (!isPy3k) ''
|
|
echo "" > setup.cfg
|
|
'';
|
|
|
|
postPatch = ''
|
|
# Remove selenium tests
|
|
rm -rf notebook/tests/selenium
|
|
export HOME=$TMPDIR
|
|
'';
|
|
|
|
disabledTests = [
|
|
# a "system_config" is generated, and fails many tests
|
|
"config"
|
|
"load_ordered"
|
|
# requires jupyter, but will cause circular imports
|
|
"test_run"
|
|
"TestInstallServerExtension"
|
|
"launch_socket"
|
|
"sock_server"
|
|
];
|
|
|
|
# Some of the tests use localhost networking.
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = {
|
|
description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing";
|
|
homepage = "https://jupyter.org/";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ fridh ];
|
|
};
|
|
}
|