From 8527eb4cce1ae4f1a6a40e45eb3ad299e7cfb95b Mon Sep 17 00:00:00 2001 From: Gerhard Schwanzer Date: Wed, 29 Jul 2026 22:48:41 +0200 Subject: [PATCH 1/2] python3Packages.jupyterlab-git-core: init at 0.54.0 Package the Core distribution introduced by upstream's workspace split. It provides the shared backend and frontend required by jupyterlab-git. https://redirect.github.com/jupyterlab/jupyterlab-git/pull/1453 Assisted-by: pi coding agent / Mika (OpenAI gpt-5.6-sol) --- .../jupyterlab-git-core/default.nix | 96 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 98 insertions(+) create mode 100644 pkgs/development/python-modules/jupyterlab-git-core/default.nix diff --git a/pkgs/development/python-modules/jupyterlab-git-core/default.nix b/pkgs/development/python-modules/jupyterlab-git-core/default.nix new file mode 100644 index 000000000000..087b6e42e175 --- /dev/null +++ b/pkgs/development/python-modules/jupyterlab-git-core/default.nix @@ -0,0 +1,96 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + git, + nodejs, + writableTmpDirAsHomeHook, + yarn-berry_3, + anyio, + hatch-jupyter-builder, + hatch-nodejs-version, + hatchling, + jupyterlab, + nbdime, + nbformat, + packaging, + pexpect, + pytest-asyncio, + pytestCheckHook, + traitlets, +}: + +buildPythonPackage rec { + pname = "jupyterlab-git-core"; + version = "0.54.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "jupyterlab"; + repo = "jupyterlab-git"; + tag = "v${version}"; + hash = "sha256-oTXvugfBay2cmRDu4yo6eFm3qGal3wgxc83dFeKs5Gw="; + }; + + nativeBuildInputs = [ + nodejs + yarn-berry_3.yarnBerryConfigHook + ]; + + offlineCache = yarn-berry_3.fetchYarnBerryDeps { + inherit src; + hash = "sha256-gJvrR/4Ov9jHjhPtlqYe9ZfMYOd2WtGQdbDGv/JikJA="; + }; + + preBuild = '' + cd packages/core + ''; + + build-system = [ + hatch-jupyter-builder + hatch-nodejs-version + hatchling + jupyterlab + ]; + + dependencies = [ + anyio + nbformat + packaging + pexpect + traitlets + ]; + + propagatedBuildInputs = [ git ]; + + nativeCheckInputs = [ + nbdime + pytest-asyncio + pytestCheckHook + writableTmpDirAsHomeHook + ]; + + preCheck = '' + ( + cd ../.. + jlpm test --runInBand \ + src/__tests__/test-components/NotebookDiff.spec.tsx \ + src/__tests__/test-components/PlainTextDiff.spec.tsx + ) + + # Upstream's Core tests import the sibling server package from the workspace. + export PYTHONPATH="$PWD/../jupyterlab''${PYTHONPATH:+:$PYTHONPATH}" + ''; + + pytestFlags = [ "--confcutdir=." ]; + + pythonImportsCheck = [ "jupyterlab_git_core" ]; + + meta = { + description = "Core package for the JupyterLab Git extension"; + homepage = "https://github.com/jupyterlab/jupyterlab-git"; + changelog = "https://github.com/jupyterlab/jupyterlab-git/blob/${src.tag}/CHANGELOG.md"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ chiroptical ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5752ba8a10eb..95105648db49 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8666,6 +8666,8 @@ self: super: with self; { jupyterlab-git = callPackage ../development/python-modules/jupyterlab-git { }; + jupyterlab-git-core = callPackage ../development/python-modules/jupyterlab-git-core { }; + jupyterlab-lsp = callPackage ../development/python-modules/jupyterlab-lsp { }; jupyterlab-pygments = callPackage ../development/python-modules/jupyterlab-pygments { }; From 817cd8bf46140c2e66af67552f1c10016c779c7f Mon Sep 17 00:00:00 2001 From: Gerhard Schwanzer Date: Wed, 29 Jul 2026 22:48:50 +0200 Subject: [PATCH 2/2] python3Packages.jupyterlab-git: 0.52.0 -> 0.54.0 Adapt to upstream's split package layout and depend on jupyterlab-git-core. The release fixes CVE-2026-54527 and CVE-2026-54528. https://redirect.github.com/jupyterlab/jupyterlab-git/blob/v0.54.0/CHANGELOG.md#0540 Assisted-by: pi coding agent / Mika (OpenAI gpt-5.6-sol) --- .../python-modules/jupyterlab-git/default.nix | 52 ++++--------------- 1 file changed, 9 insertions(+), 43 deletions(-) diff --git a/pkgs/development/python-modules/jupyterlab-git/default.nix b/pkgs/development/python-modules/jupyterlab-git/default.nix index 759833aab88a..e740150d3b52 100644 --- a/pkgs/development/python-modules/jupyterlab-git/default.nix +++ b/pkgs/development/python-modules/jupyterlab-git/default.nix @@ -1,21 +1,14 @@ { lib, buildPythonPackage, - fetchFromGitHub, - git, gitMinimal, - nodejs, writableTmpDirAsHomeHook, - yarn-berry_3, - jupyter-server, - hatch-jupyter-builder, hatch-nodejs-version, hatchling, - jupyterlab, + jupyterlab-git-core, + jupyter-server, + jupytext, nbdime, - nbformat, - packaging, - pexpect, pytest-asyncio, pytest-jupyter, pytest-tornasync, @@ -25,46 +18,28 @@ buildPythonPackage rec { pname = "jupyterlab-git"; - version = "0.52.0"; + inherit (jupyterlab-git-core) src version; pyproject = true; - src = fetchFromGitHub { - owner = "jupyterlab"; - repo = "jupyterlab-git"; - tag = "v${version}"; - hash = "sha256-BMzn+134hSYUFrDF+4+Bs81hzSURP9VNX4D9x2UuPMQ="; - }; - - nativeBuildInputs = [ - nodejs - yarn-berry_3.yarnBerryConfigHook - ]; - - offlineCache = yarn-berry_3.fetchYarnBerryDeps { - inherit src; - hash = "sha256-3pVc4xz5ilamCg97wdaLQliBHeSr3mPYwhgnz/lvfj0="; - }; + preBuild = '' + cd packages/jupyterlab + ''; build-system = [ - hatch-jupyter-builder hatch-nodejs-version hatchling - jupyterlab ]; dependencies = [ + jupyterlab-git-core jupyter-server nbdime - nbformat - packaging - pexpect traitlets ]; - propagatedBuildInputs = [ git ]; - nativeCheckInputs = [ gitMinimal + jupytext pytest-asyncio pytest-jupyter pytest-tornasync @@ -72,15 +47,6 @@ buildPythonPackage rec { writableTmpDirAsHomeHook ]; - disabledTestPaths = [ - "jupyterlab_git/tests/test_handlers.py" - ]; - - disabledTests = [ - "test_Git_get_nbdiff_file" - "test_Git_get_nbdiff_dict" - ]; - pythonImportsCheck = [ "jupyterlab_git" ]; __darwinAllowLocalNetworking = true;