From 9a19e5983d25c0fb9b698d9de984efc9ba807ffb Mon Sep 17 00:00:00 2001 From: Harinn Date: Thu, 4 Jun 2026 19:14:31 +0700 Subject: [PATCH 1/5] python3Packages.anyqt: migrate to pyproject --- pkgs/development/python-modules/anyqt/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/anyqt/default.nix b/pkgs/development/python-modules/anyqt/default.nix index 7e6742b432ca..3133829a8ba1 100644 --- a/pkgs/development/python-modules/anyqt/default.nix +++ b/pkgs/development/python-modules/anyqt/default.nix @@ -4,13 +4,14 @@ fetchFromGitHub, pyqt5, pytestCheckHook, + setuptools, nix-update-script, }: buildPythonPackage rec { pname = "anyqt"; version = "0.2.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "ales-erjavec"; @@ -19,6 +20,8 @@ buildPythonPackage rec { hash = "sha256-iDUgu+x9rnpxpHzO7Rf2rJFXsheivrK7HI3FUbomkTU="; }; + build-system = [ setuptools ]; + nativeCheckInputs = [ pyqt5 pytestCheckHook From 0cf9d2ef8e8d4e9155a7d75e8a9e5ca05df70d82 Mon Sep 17 00:00:00 2001 From: Harinn Date: Thu, 4 Jun 2026 19:16:23 +0700 Subject: [PATCH 2/5] python3Packages.anyqt: modernize --- pkgs/development/python-modules/anyqt/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/anyqt/default.nix b/pkgs/development/python-modules/anyqt/default.nix index 3133829a8ba1..b7c6f5bc5967 100644 --- a/pkgs/development/python-modules/anyqt/default.nix +++ b/pkgs/development/python-modules/anyqt/default.nix @@ -8,7 +8,7 @@ nix-update-script, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "anyqt"; version = "0.2.1"; pyproject = true; @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "ales-erjavec"; repo = "anyqt"; - rev = version; + tag = finalAttrs.version; hash = "sha256-iDUgu+x9rnpxpHzO7Rf2rJFXsheivrK7HI3FUbomkTU="; }; @@ -49,4 +49,4 @@ buildPythonPackage rec { license = [ lib.licenses.gpl3Only ]; maintainers = [ lib.maintainers.lucasew ]; }; -} +}) From 122520e8ed54a0ba2b242a27a9999506cdfc23c9 Mon Sep 17 00:00:00 2001 From: Harinn Date: Thu, 4 Jun 2026 19:19:31 +0700 Subject: [PATCH 3/5] python3Packages.anyqt: add meta.changelog --- pkgs/development/python-modules/anyqt/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/anyqt/default.nix b/pkgs/development/python-modules/anyqt/default.nix index b7c6f5bc5967..e2b5bcdc227c 100644 --- a/pkgs/development/python-modules/anyqt/default.nix +++ b/pkgs/development/python-modules/anyqt/default.nix @@ -46,6 +46,7 @@ buildPythonPackage (finalAttrs: { meta = { description = "PyQt/PySide compatibility layer"; homepage = "https://github.com/ales-erjavec/anyqt"; + changelog = "https://github.com/ales-erjavec/anyqt/releases/tag/${finalAttrs.version}"; license = [ lib.licenses.gpl3Only ]; maintainers = [ lib.maintainers.lucasew ]; }; From 07d5c6bc856f2a76287a070e2df4e7f6cf14f478 Mon Sep 17 00:00:00 2001 From: Harinn Date: Fri, 5 Jun 2026 09:41:18 +0700 Subject: [PATCH 4/5] python3Packages.anyqt: re-enable tests via offscreen Qt platform --- .../python-modules/anyqt/default.nix | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/anyqt/default.nix b/pkgs/development/python-modules/anyqt/default.nix index e2b5bcdc227c..2e5ff8732a64 100644 --- a/pkgs/development/python-modules/anyqt/default.nix +++ b/pkgs/development/python-modules/anyqt/default.nix @@ -4,7 +4,9 @@ fetchFromGitHub, pyqt5, pytestCheckHook, + qt5, setuptools, + writableTmpDirAsHomeHook, nix-update-script, }: @@ -25,19 +27,13 @@ buildPythonPackage (finalAttrs: { nativeCheckInputs = [ pyqt5 pytestCheckHook + writableTmpDirAsHomeHook ]; - # All of these fail because Qt modules cannot be imported - disabledTestPaths = [ - "tests/test_qabstractitemview.py" - "tests/test_qaction_set_menu.py" - "tests/test_qactionevent_action.py" - "tests/test_qfontdatabase_static.py" - "tests/test_qpainter_draw_pixmap_fragments.py" - "tests/test_qsettings.py" - "tests/test_qstandarditem_insertrow.py" - "tests/test_qtest.py" - ]; + preCheck = '' + export QT_PLUGIN_PATH="${lib.getBin qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}" + export QT_QPA_PLATFORM=offscreen + ''; pythonImportsCheck = [ "AnyQt" ]; From 64aee2f5767e2245fbdbf6e19454bf3a7d900ee7 Mon Sep 17 00:00:00 2001 From: Harinn Date: Fri, 5 Jun 2026 10:02:40 +0700 Subject: [PATCH 5/5] python3Packages.anyqt: disable failing tests on darwin --- pkgs/development/python-modules/anyqt/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/python-modules/anyqt/default.nix b/pkgs/development/python-modules/anyqt/default.nix index 2e5ff8732a64..36eb77416ae1 100644 --- a/pkgs/development/python-modules/anyqt/default.nix +++ b/pkgs/development/python-modules/anyqt/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, pyqt5, @@ -35,6 +36,17 @@ buildPythonPackage (finalAttrs: { export QT_QPA_PLATFORM=offscreen ''; + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ + "tests/test_qabstractitemview.py" + "tests/test_qaction_set_menu.py" + "tests/test_qactionevent_action.py" + "tests/test_qfontdatabase_static.py" + "tests/test_qpainter_draw_pixmap_fragments.py" + "tests/test_qsettings.py" + "tests/test_qstandarditem_insertrow.py" + "tests/test_qtest.py" + ]; + pythonImportsCheck = [ "AnyQt" ]; passthru.updateScript = nix-update-script { };