8 , configurable-http-proxy
43 # js/css assets that setup.py tries to fetch via `npm install` when building
44 # from source. https://github.com/jupyterhub/jupyterhub/blob/master/package.json
47 url = "https://registry.npmjs.org/bootstrap/-/bootstrap-3.4.1.tgz";
48 sha256 = "1ywmxqdccg0mgx0xknrn1hlrfnhcwphc12y9l91zizx26fqfmzgc";
52 url = "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz";
53 sha256 = "1xnxbdlfdd60z5ix152m8r2kk9dkwlqwpypky1mm3dv64ajnzdbk";
57 url = "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz";
58 sha256 = "0yi9ql493din1qa1s923nd5zvd0klk1sx00xj1wx2yambmq86vm9";
62 url = "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz";
63 sha256 = "0ifzzla4zffw23g3xvhwx3fj3jny6cjzxfzl1x0317q8wa0c7w5i";
67 url = "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz";
68 sha256 = "165hkli3qcd59cjqvli9r5f92i0h7czkmhcg1cgwamw2d0b7xibz";
73 buildPythonPackage rec {
76 format = "setuptools";
78 disabled = pythonOlder "3.7";
81 inherit pname version;
82 hash = "sha256-1ORQ7tjZDfvPDsoI8A8gk6C8503FH3z8C3BX9gI0Gh0=";
85 # Most of this only applies when building from source (e.g. js/css assets are
86 # pre-built and bundled in the official release tarball on pypi).
88 # Stuff that's always needed:
89 # * At runtime, we need configurable-http-proxy, so we substitute the store
92 # Other stuff that's only needed when building from source:
93 # * js/css assets are fetched from npm.
94 # * substitute store path for `lessc` commmand.
95 # * set up NODE_PATH so `lessc` can find `less-plugin-clean-css`.
96 # * don't run `npm install`.
98 export NODE_PATH=${nodePackages.less-plugin-clean-css}/lib/node_modules
100 substituteInPlace jupyterhub/proxy.py --replace \
101 "'configurable-http-proxy'" \
102 "'${configurable-http-proxy}/bin/configurable-http-proxy'"
104 substituteInPlace jupyterhub/tests/test_proxy.py --replace \
105 "'configurable-http-proxy'" \
106 "'${configurable-http-proxy}/bin/configurable-http-proxy'"
108 substituteInPlace setup.py --replace \
112 deps[bootstrap]=${bootstrap}
113 deps[font-awesome]=${font-awesome}
114 deps[jquery]=${jquery}
115 deps[moment]=${moment}
116 deps[requirejs]=${requirejs}
118 mkdir -p share/jupyter/hub/static/components
119 for dep in "''${!deps[@]}"; do
120 if [ ! -e share/jupyter/hub/static/components/$dep ]; then
121 cp -r ''${deps[$dep]} share/jupyter/hub/static/components/$dep
126 propagatedBuildInputs = [
145 ] ++ lib.optionals (pythonOlder "3.10") [
149 nativeCheckInputs = [
165 substituteInPlace jupyterhub/tests/test_spawner.py --replace \
166 "'jupyterhub-singleuser'" "'$out/bin/jupyterhub-singleuser'"
167 export PATH="$PATH:$out/bin";
171 # Tries to install older versions through pip
173 # Testcase fails to find requests import
174 "test_external_service"
175 # Attempts to do TLS connection
176 "test_connection_notebook_wrong_certs"
177 # AttributeError: 'coroutine' object...
179 "test_invalid_events"
180 "test_user_group_roles"
183 disabledTestPaths = [
184 # Not testing with a running instance
185 # AttributeError: 'coroutine' object has no attribute 'db'
187 "jupyterhub/tests/browser/test_browser.py"
188 "jupyterhub/tests/test_api.py"
189 "jupyterhub/tests/test_auth_expiry.py"
190 "jupyterhub/tests/test_auth.py"
191 "jupyterhub/tests/test_metrics.py"
192 "jupyterhub/tests/test_named_servers.py"
193 "jupyterhub/tests/test_orm.py"
194 "jupyterhub/tests/test_pages.py"
195 "jupyterhub/tests/test_proxy.py"
196 "jupyterhub/tests/test_scopes.py"
197 "jupyterhub/tests/test_services_auth.py"
198 "jupyterhub/tests/test_singleuser.py"
199 "jupyterhub/tests/test_spawner.py"
200 "jupyterhub/tests/test_user.py"
204 description = "Serves multiple Jupyter notebook instances";
205 homepage = "https://jupyter.org/";
206 changelog = "https://github.com/jupyterhub/jupyterhub/blob/${version}/docs/source/reference/changelog.md";
207 license = licenses.bsd3;
208 # darwin: E OSError: dlopen(/nix/store/43zml0mlr17r5jsagxr00xxx91hz9lky-openpam-20170430/lib/libpam.so, 6): image not found
209 broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;