diff --git a/pkgs/development/python-modules/anywidget/default.nix b/pkgs/development/python-modules/anywidget/default.nix index d993af0654f83..f96ef47e7332c 100644 --- a/pkgs/development/python-modules/anywidget/default.nix +++ b/pkgs/development/python-modules/anywidget/default.nix @@ -7,7 +7,6 @@ , hatchling , importlib-metadata , ipywidgets -, jupyterlab , psygnal , typing-extensions , watchfiles @@ -25,10 +24,17 @@ buildPythonPackage rec { hash = "sha256-OUKxmYceEKURJeQTVI7oLT4SdZM90V7BoZf0UykkEV4="; }; + # We do not need the jupyterlab build dependency, because we do not need to + # build any JS components; these are present already in the PyPI artifact. + # + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '"jupyterlab==3.*"' "" + ''; + nativeBuildInputs = [ hatch-jupyter-builder hatchling - jupyterlab ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/bqscales/default.nix b/pkgs/development/python-modules/bqscales/default.nix index 3bd015a58f67a..8b0ebb610ad9d 100644 --- a/pkgs/development/python-modules/bqscales/default.nix +++ b/pkgs/development/python-modules/bqscales/default.nix @@ -13,7 +13,6 @@ buildPythonPackage rec { pname = "bqscales"; version = "0.3.1"; - format = "pyproject"; disabled = pythonOlder "3.6"; @@ -22,6 +21,19 @@ buildPythonPackage rec { hash = "sha256-C+/GLpqYpePngbn5W0MwvpdmVgFZF7aGHyKMgO5XM90="; }; + # We relax dependencies here instead of pulling in a patch because upstream + # has released a new version using hatch-jupyter-builder, but it is not yet + # trivial to upgrade to that. + # + # Per https://github.com/bqplot/bqscales/issues/76, jupyterlab is not needed + # as a build dependency right now. + # + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '"jupyterlab==3.*",' "" \ + --replace 'jupyter_packaging~=' 'jupyter_packaging>=' + ''; + nativeBuildInputs = [ hatchling jupyter-packaging diff --git a/pkgs/development/python-modules/ipycanvas/default.nix b/pkgs/development/python-modules/ipycanvas/default.nix index 05fdb6e858826..85961b450ec17 100644 --- a/pkgs/development/python-modules/ipycanvas/default.nix +++ b/pkgs/development/python-modules/ipycanvas/default.nix @@ -20,6 +20,16 @@ buildPythonPackage rec { hash = "sha256-+cOUBoG8ODgzkPjEbqXYRF1uEcbaZITDfYnfWuHawTE="; }; + # We relax dependencies here instead of pulling in a patch because upstream + # has released a new version using hatch-jupyter-builder, but it is not yet + # trivial to upgrade to that. + # + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '"jupyterlab==3.*",' "" \ + --replace 'jupyter_packaging~=' 'jupyter_packaging>=' + ''; + nativeBuildInputs = [ jupyter-packaging ]; propagatedBuildInputs = [ ipywidgets numpy pillow ]; diff --git a/pkgs/development/python-modules/ipyniivue/default.nix b/pkgs/development/python-modules/ipyniivue/default.nix index a126030d0cb1f..2f711f92a087d 100644 --- a/pkgs/development/python-modules/ipyniivue/default.nix +++ b/pkgs/development/python-modules/ipyniivue/default.nix @@ -21,7 +21,18 @@ buildPythonPackage rec { hash = "sha256-kym7949VI6C+62p3IOQ2QIzWnuSBcrmySb83oqUwhjI="; }; - nativeBuildInputs = [ hatchling hatch-jupyter-builder ]; + # We do not need the jupyterlab build dependency, because we do not need to + # build any JS components; these are present already in the PyPI artifact. + # + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '"jupyterlab==3.*",' "" + ''; + + nativeBuildInputs = [ + hatchling + hatch-jupyter-builder + ]; propagatedBuildInputs = [ ipywidgets jupyter-ui-poll ]; diff --git a/pkgs/development/python-modules/ipyparallel/default.nix b/pkgs/development/python-modules/ipyparallel/default.nix index 272a192e3adab..509b70b7fd3a2 100644 --- a/pkgs/development/python-modules/ipyparallel/default.nix +++ b/pkgs/development/python-modules/ipyparallel/default.nix @@ -28,6 +28,14 @@ buildPythonPackage rec { hash = "sha256-o5ql75VgFwvw6a/typ/wReG5wYMsSTAzd+3Mkc6p+3c="; }; + # We do not need the jupyterlab build dependency, because we do not need to + # build any JS components; these are present already in the PyPI artifact. + # + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '"jupyterlab>=3.0.0,==3.*",' "" + ''; + nativeBuildInputs = [ hatchling ]; diff --git a/pkgs/development/python-modules/ipytablewidgets/default.nix b/pkgs/development/python-modules/ipytablewidgets/default.nix index 6e05a3a36f0a5..4aad3219eb52b 100644 --- a/pkgs/development/python-modules/ipytablewidgets/default.nix +++ b/pkgs/development/python-modules/ipytablewidgets/default.nix @@ -27,6 +27,15 @@ buildPythonPackage rec { hash = "sha256-14vIih+r/PHLxhgG29YtwuosSBLpewD2CluWpH2+pLc="; }; + # Opened https://github.com/progressivis/ipytablewidgets/issues/3 to ask if + # jupyterlab can be updated upstream. (From commits, it looks like it was + # set to this version on purpose.) In the meantime, the build still works. + # + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'jupyterlab>=3.0.0,<3.7' 'jupyterlab>=3.0.0' + ''; + nativeBuildInputs = [ jupyter-packaging jupyterlab