Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
4.2 kB · 187 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188{ lib, buildPythonPackage, fetchFromGitHub, fetchNpmDeps, configurable-http-proxy,
# nativeBuildInputs nodejs, npmHooks,
# build-system setuptools, setuptools-scm,
# dependencies alembic, certipy, idna, jinja2, jupyter-events, oauthlib, packaging, pamela, prometheus-client, pydantic, python-dateutil, requests, sqlalchemy, tornado, traitlets, pythonOlder, async-generator, importlib-metadata,
# tests addBinToPathHook, beautifulsoup4, cryptography, jsonschema, jupyterlab, mock, nbclassic, playwright, pytest-asyncio, pytestCheckHook, requests-mock, versionCheckHook, virtualenv,}:
buildPythonPackage rec { pname = "jupyterhub"; version = "5.3.0"; pyproject = true;
src = fetchFromGitHub { owner = "jupyterhub"; repo = "jupyterhub"; rev = "refs/tags/${version}"; hash = "sha256-FAVNS7GPvglFuSTDTAUtZ6ZzY4yH+eo34KhUQ4C3b4I="; };
npmDeps = fetchNpmDeps { inherit src; hash = "sha256-1ffF3i/IgE+J+0M+z6bzwZ9H8u0EYcYXTiBD9Jj7HdQ="; };
postPatch = '' substituteInPlace jupyterhub/proxy.py \ --replace-fail \ "'configurable-http-proxy'" \ "'${lib.getExe configurable-http-proxy}'"
substituteInPlace jupyterhub/tests/test_proxy.py \ --replace-fail \ "'configurable-http-proxy'" \ "'${lib.getExe configurable-http-proxy}'" '';
nativeBuildInputs = [ nodejs npmHooks.npmConfigHook ];
build-system = [ setuptools setuptools-scm ];
dependencies = [ alembic certipy idna jinja2 jupyter-events oauthlib packaging pamela prometheus-client pydantic python-dateutil requests sqlalchemy tornado traitlets ] ++ lib.optionals (pythonOlder "3.10") [ async-generator importlib-metadata ];
pythonImportsCheck = [ "jupyterhub" ];
nativeCheckInputs = [ addBinToPathHook beautifulsoup4 cryptography jsonschema jupyterlab mock nbclassic playwright # require pytest-asyncio<0.23 # https://github.com/jupyterhub/jupyterhub/pull/4663 (pytest-asyncio.overrideAttrs ( final: prev: { version = "0.21.2"; src = fetchFromGitHub { inherit (prev.src) owner repo; rev = "refs/tags/v${final.version}"; hash = "sha256-AVVvdo/CDF9IU6l779sLc7wKz5h3kzMttdDNTPLYxtQ="; }; } )) pytestCheckHook requests-mock versionCheckHook virtualenv ]; versionCheckProgramArg = "--version";
disabledTests = [ # Tries to install older versions through pip "test_upgrade" # Testcase fails to find requests import "test_external_service" # Attempts to do TLS connection "test_connection_notebook_wrong_certs" # AttributeError: 'coroutine' object... "test_valid_events" "test_invalid_events" "test_user_group_roles" ];
disabledTestPaths = [ # Not testing with a running instance # AttributeError: 'coroutine' object has no attribute 'db' "docs/test_docs.py" "jupyterhub/tests/browser/test_browser.py" "jupyterhub/tests/test_api.py" "jupyterhub/tests/test_auth_expiry.py" "jupyterhub/tests/test_auth.py" "jupyterhub/tests/test_metrics.py" "jupyterhub/tests/test_named_servers.py" "jupyterhub/tests/test_orm.py" "jupyterhub/tests/test_pages.py" "jupyterhub/tests/test_proxy.py" "jupyterhub/tests/test_scopes.py" "jupyterhub/tests/test_services_auth.py" "jupyterhub/tests/test_singleuser.py" "jupyterhub/tests/test_spawner.py" "jupyterhub/tests/test_user.py" ];
meta = { description = "Serves multiple Jupyter notebook instances"; homepage = "https://github.com/jupyterhub/jupyterhub"; changelog = "https://github.com/jupyterhub/jupyterhub/blob/${version}/docs/source/reference/changelog.md"; license = lib.licenses.bsd3; teams = [ lib.teams.jupyter ]; badPlatforms = [ # E OSError: dlopen(/nix/store/43zml0mlr17r5jsagxr00xxx91hz9lky-openpam-20170430/lib/libpam.so, 6): image not found lib.systems.inspect.patterns.isDarwin ]; };}