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)
This commit is contained in:
Gerhard Schwanzer
2026-07-29 23:38:49 +02:00
parent 9d914db230
commit 8527eb4cce
2 changed files with 98 additions and 0 deletions
@@ -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 ];
};
}
+2
View File
@@ -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 { };