From 06e603c610c51e59f42afdd1dcd69cc40ef66c03 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:42:37 -0700 Subject: [PATCH 1/9] python310Packages.bqplot: relax jupyter build dependencies --- pkgs/development/python-modules/bqplot/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/bqplot/default.nix b/pkgs/development/python-modules/bqplot/default.nix index 074c75fffb7a..5695be669bbc 100644 --- a/pkgs/development/python-modules/bqplot/default.nix +++ b/pkgs/development/python-modules/bqplot/default.nix @@ -3,6 +3,7 @@ , pythonOlder , fetchPypi , jupyter-packaging +, jupyterlab , bqscales , ipywidgets , numpy @@ -23,8 +24,17 @@ buildPythonPackage rec { hash = "sha256-FNjeb5pNGUW76mwTIOpNHJMlb3JoN3T24AINzFefPdI="; }; + # upstream seems in flux for 0.13 release. they seem to want to migrate from + # jupyter_packaging to hatch, so let's patch instead of fixing upstream + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "jupyter_packaging~=" "jupyter_packaging>=" \ + --replace "jupyterlab~=" "jupyterlab>=" + ''; + nativeBuildInputs = [ jupyter-packaging + jupyterlab ]; propagatedBuildInputs = [ From 39c8049f064511cd48c2037463292eb9c62ee378 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:43:00 -0700 Subject: [PATCH 2/9] python310Packages.django-scim2: fully move to poetry-core --- pkgs/development/python-modules/django-scim2/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/django-scim2/default.nix b/pkgs/development/python-modules/django-scim2/default.nix index 536d851a4099..d4eab102d719 100644 --- a/pkgs/development/python-modules/django-scim2/default.nix +++ b/pkgs/development/python-modules/django-scim2/default.nix @@ -27,8 +27,10 @@ buildPythonPackage rec { hash = "sha256-larDh4f9/xVr11/n/WfkJ2Tx45DMQqyK3ZzkWAvzeig="; }; + # remove this when upstream releases a new version > 0.19.0 postPatch = '' substituteInPlace pyproject.toml \ + --replace "poetry>=0.12" "poetry-core>=1.5.2" \ --replace "poetry.masonry.api" "poetry.core.masonry.api" ''; From b7ad6c5259fd5aeac439edd3ee518e7449afd97f Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:43:28 -0700 Subject: [PATCH 3/9] python310Packages.jupyter-collaboration: add missing jupyterlab dependency --- .../python-modules/jupyter-collaboration/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/jupyter-collaboration/default.nix b/pkgs/development/python-modules/jupyter-collaboration/default.nix index 17ec03145137..0038f57b114d 100644 --- a/pkgs/development/python-modules/jupyter-collaboration/default.nix +++ b/pkgs/development/python-modules/jupyter-collaboration/default.nix @@ -10,6 +10,7 @@ , jupyter-server , jupyter-server-fileid , jupyter-ydoc +, jupyterlab , ypy-websocket , pytest-asyncio , pytest-jupyter @@ -38,6 +39,7 @@ buildPythonPackage rec { hatch-jupyter-builder hatch-nodejs-version hatchling + jupyterlab pythonRelaxDepsHook ]; From f61a460fe2407f44b9e1fc78c88c10bb07b80126 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:43:48 -0700 Subject: [PATCH 4/9] python310Packages.python-telegram-bot: switch to pyproject build For a reason that I don't know, it fixes the setuptools build creating duplicate file entries in the wheel. --- .../python-modules/python-telegram-bot/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/python-telegram-bot/default.nix b/pkgs/development/python-modules/python-telegram-bot/default.nix index cea69bf5b14b..605d8157051c 100644 --- a/pkgs/development/python-modules/python-telegram-bot/default.nix +++ b/pkgs/development/python-modules/python-telegram-bot/default.nix @@ -14,13 +14,15 @@ , pytestCheckHook , pythonOlder , pytz +, setuptools +, wheel , tornado }: buildPythonPackage rec { pname = "python-telegram-bot"; version = "20.4"; - format = "setuptools"; + format = "pyproject"; disabled = pythonOlder "3.8"; @@ -31,6 +33,11 @@ buildPythonPackage rec { hash = "sha256-owbJJZjBkMjsgfBLRl+rnePrIvQ0sUZs7rP9ie912pw="; }; + nativeBuildInputs = [ + setuptools + wheel + ]; + propagatedBuildInputs = [ aiolimiter apscheduler From d07f7a9cd1fafb3b0c5bebdef3dc78a65d731f1f Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:45:01 -0700 Subject: [PATCH 5/9] python310Packages.qcodes-loop: relax versioningit dependency --- .../python-modules/qcodes-loop/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qcodes-loop/default.nix b/pkgs/development/python-modules/qcodes-loop/default.nix index ef65af007d90..2590a557b8ce 100644 --- a/pkgs/development/python-modules/qcodes-loop/default.nix +++ b/pkgs/development/python-modules/qcodes-loop/default.nix @@ -1,4 +1,5 @@ { lib +, fetchpatch , fetchPypi , pythonOlder , buildPythonPackage @@ -8,7 +9,9 @@ , matplotlib , numpy , pandas +, setuptools , versioningit +, wheel , xarray , hickle , ipython @@ -24,18 +27,29 @@ buildPythonPackage rec { pname = "qcodes-loop"; version = "0.1.1"; + format = "pyproject"; disabled = pythonOlder "3.8"; - format = "pyproject"; src = fetchPypi { inherit version; pname = "qcodes_loop"; - sha256 = "sha256-pDR0Ws8cYQifftdE9dKcSzMxmouFo4tJmQvNanm6zyM="; + hash = "sha256-pDR0Ws8cYQifftdE9dKcSzMxmouFo4tJmQvNanm6zyM="; }; + patches = [ + # https://github.com/QCoDeS/Qcodes_loop/pull/39 + (fetchpatch { + name = "relax-versioningit-dependency.patch"; + url = "https://github.com/QCoDeS/Qcodes_loop/commit/58006d3fb57344ae24dd44bceca98004617b5b57.patch"; + hash = "sha256-mSlm/Ql8e5xPL73ifxSoVc9+U58AAcAmBkdW5P6zEsg="; + }) + ]; + nativeBuildInputs = [ + setuptools versioningit + wheel ]; propagatedBuildInputs = [ From 118c2681fb404de6703dc755990b3ff37005fb56 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:45:23 -0700 Subject: [PATCH 6/9] python310Packages.soxr: add missing oldest-supported-numpy dependency --- pkgs/development/python-modules/soxr/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/soxr/default.nix b/pkgs/development/python-modules/soxr/default.nix index 7c9251dfd7b6..20532f4c00fa 100644 --- a/pkgs/development/python-modules/soxr/default.nix +++ b/pkgs/development/python-modules/soxr/default.nix @@ -2,9 +2,10 @@ , buildPythonPackage , fetchFromGitHub -# build-sytem +# build-system , cython_3 , numpy +, oldest-supported-numpy , setuptools , setuptools-scm , gnutar @@ -29,12 +30,13 @@ buildPythonPackage rec { hash = "sha256-q/K7XlqvDHAna+fqN6iiJ9wD8efsuwHiEfKjXS46jz8="; }; - SETUPTOOLS_SCM_PRETEND_VERSION = version; + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; nativeBuildInputs = [ cython_3 gnutar numpy + oldest-supported-numpy setuptools setuptools-scm ]; From 30a4bbc896199a15089a0710b647336a0917f72f Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:45:47 -0700 Subject: [PATCH 7/9] gphotos-sync: relax build dependencies --- pkgs/tools/backup/gphotos-sync/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/backup/gphotos-sync/default.nix b/pkgs/tools/backup/gphotos-sync/default.nix index 707828fae713..27caf6df4db0 100644 --- a/pkgs/tools/backup/gphotos-sync/default.nix +++ b/pkgs/tools/backup/gphotos-sync/default.nix @@ -21,7 +21,19 @@ python3.pkgs.buildPythonApplication rec { ./skip-network-tests.patch ]; - nativeBuildInputs = [ python3.pkgs.pythonRelaxDepsHook ]; + # Consider fixing this upstream by following up on: + # https://github.com/gilesknap/gphotos-sync/issues/441 + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "setuptools<57" "setuptools" \ + --replace "wheel==0.33.1" "wheel" + ''; + + nativeBuildInputs = with python3.pkgs; [ + pythonRelaxDepsHook + setuptools + wheel + ]; pythonRelaxDeps = [ "psutil" From 5d4857bc3ba8fb4d1586493cda98ab19ef0bfdc3 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:46:06 -0700 Subject: [PATCH 8/9] apachetomcatscanner: remove duplicate script --- pkgs/tools/security/apachetomcatscanner/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/security/apachetomcatscanner/default.nix b/pkgs/tools/security/apachetomcatscanner/default.nix index 13a11808b7dd..41c68aa79792 100644 --- a/pkgs/tools/security/apachetomcatscanner/default.nix +++ b/pkgs/tools/security/apachetomcatscanner/default.nix @@ -15,6 +15,12 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-ChVVXUjm6y71iRs64Kv63oiOG1GSqmx6J0YiGtEI0ao="; }; + # Posted a PR for discussion upstream that can be followed: + # https://github.com/p0dalirius/ApacheTomcatScanner/pull/32 + postPatch = '' + sed -i '/apachetomcatscanner=apachetomcatscanner\.__main__:main/d' setup.py + ''; + propagatedBuildInputs = with python3.pkgs; [ requests sectools From 8d5f4d61a8ae9baf7a48ec2d4a89f8c05aa7ecc5 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:46:28 -0700 Subject: [PATCH 9/9] mkosi: add missing build dependencies --- pkgs/tools/virtualization/mkosi/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/virtualization/mkosi/default.nix b/pkgs/tools/virtualization/mkosi/default.nix index 345e65d04881..8fc5376e4c2c 100644 --- a/pkgs/tools/virtualization/mkosi/default.nix +++ b/pkgs/tools/virtualization/mkosi/default.nix @@ -1,6 +1,8 @@ { lib , fetchFromGitHub , setuptools +, setuptools-scm +, wheel , buildPythonApplication , pytestCheckHook , bubblewrap @@ -41,9 +43,10 @@ buildPythonApplication rec { nativeBuildInputs = [ setuptools + setuptools-scm + wheel ]; - propagatedBuildInputs = [ systemdForMkosi bubblewrap