Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140{ lib, buildPythonPackage, fetchFromGitHub,
# nativeBuildInputs yarn-berry_3, nodejs,
# build-system hatch-jupyter-builder, hatchling, jupyter-builder,
# dependencies async-lru, httpx, ipykernel, jinja2, jupyter-core, jupyter-lsp, jupyter-server, jupyterlab-server, notebook-shim, packaging, tomli, tornado, traitlets,
# tests pytest-jupyter, pytestCheckHook, versionCheckHook,}:
let yarn-berry = yarn-berry_3;inbuildPythonPackage (finalAttrs: { pname = "jupyterlab"; version = "4.6.4"; pyproject = true; __structuredAttrs = true;
src = fetchFromGitHub { owner = "jupyterlab"; repo = "jupyterlab"; tag = "v${finalAttrs.version}"; hash = "sha256-UEyqx8xibK2Ll1zqWJBoilAvvjypF6zuSR2ywXXseqE="; };
nativeBuildInputs = [ nodejs yarn-berry.yarnBerryConfigHook ];
build-system = [ hatch-jupyter-builder hatchling jupyter-builder ];
preConfigure = '' pushd jupyterlab/staging '';
missingHashes = ./missing-hashes.json; offlineCache = yarn-berry.fetchYarnBerryDeps { inherit (finalAttrs) src missingHashes; sourceRoot = "${finalAttrs.src.name}/jupyterlab/staging"; hash = "sha256-aGQkcZmNYS1plaZReN9oLMVwbDO6/zyQX/NUSGFzg+4="; };
preBuild = '' popd '';
dependencies = [ async-lru httpx ipykernel jinja2 jupyter-builder jupyter-core jupyter-lsp jupyter-server jupyterlab-server notebook-shim packaging tomli tornado traitlets ];
makeWrapperArgs = [ "--set" "JUPYTERLAB_DIR" "${placeholder "out"}/share/jupyter/lab" ];
# Ship a setup hook that seeds jupyter-builder's core-meta cache for any downstream JupyterLab # extension build (see the hook for details). postInstall = '' mkdir -p "$out/nix-support"
substitute \ ${./seed-core-meta-hook.sh} \ "$out/nix-support/setup-hook" \ --subst-var out '';
pythonImportsCheck = [ "jupyterlab" ];
nativeCheckInputs = [ pytest-jupyter pytestCheckHook versionCheckHook ];
disabledTests = [ # Hang forever "TestExtension"
# tornado.httpclient.HTTPClientError: HTTP 500: Internal Server Error "TestBuildAPI" ];
__darwinAllowLocalNetworking = true;
meta = { description = "Jupyter lab environment notebook server extension"; homepage = "https://jupyter.org/"; downloadPage = "https://github.com/jupyterlab/jupyterlab"; changelog = "https://github.com/jupyterlab/jupyterlab/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.bsd3; teams = [ lib.teams.jupyter ]; mainProgram = "jupyter-lab"; };})