Files
nixpkgs/pkgs/development/python-modules/jupyterlab/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

101 lines
1.8 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
nodejs,
yarn-berry_3,
hatch-jupyter-builder,
hatchling,
async-lru,
httpx,
importlib-metadata,
ipykernel,
jinja2,
jupyter-core,
jupyter-lsp,
jupyter-server,
jupyterlab-server,
notebook-shim,
packaging,
setuptools,
tomli,
tornado,
traitlets,
pythonOlder,
}:
buildPythonPackage rec {
pname = "jupyterlab";
version = "4.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "jupyterlab";
repo = "jupyterlab";
tag = "v${version}";
hash = "sha256-3vKz79/19F4kZeTjHSChgwAsM8quzIVBmjiRekA/8vo=";
};
nativeBuildInputs = [
nodejs
yarn-berry_3.yarnBerryConfigHook
];
preConfigure = ''
pushd jupyterlab/staging
'';
offlineCache = yarn-berry_3.fetchYarnBerryDeps {
inherit src;
sourceRoot = "${src.name}/jupyterlab/staging";
hash = "sha256-3Gvbsi/oi8lTRrCYut126zsksjSSWmfJCoRxDmjne1E=";
};
preBuild = ''
popd
'';
build-system = [
hatch-jupyter-builder
hatchling
];
dependencies = [
async-lru
httpx
ipykernel
jinja2
jupyter-core
jupyter-lsp
jupyter-server
jupyterlab-server
notebook-shim
packaging
setuptools
tornado
traitlets
]
++ lib.optionals (pythonOlder "3.11") [ tomli ]
++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
makeWrapperArgs = [
"--set"
"JUPYTERLAB_DIR"
"$out/share/jupyter/lab"
];
# Depends on npm
doCheck = false;
pythonImportsCheck = [ "jupyterlab" ];
meta = {
changelog = "https://github.com/jupyterlab/jupyterlab/blob/${src.tag}/CHANGELOG.md";
description = "Jupyter lab environment notebook server extension";
license = lib.licenses.bsd3;
homepage = "https://jupyter.org/";
teams = [ lib.teams.jupyter ];
mainProgram = "jupyter-lab";
};
}