From da525beb6c40ee2245e7f8acdb6d316082b2a550 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Sat, 13 Jun 2026 14:51:34 +0800 Subject: [PATCH 1/4] python3Packages.plover_5: handle PySide6-Essentials exclusion with pythonRemoveDeps --- pkgs/development/python-modules/plover/5.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/plover/5.nix b/pkgs/development/python-modules/plover/5.nix index 1abbf78609e9..ed3a329559bc 100644 --- a/pkgs/development/python-modules/plover/5.nix +++ b/pkgs/development/python-modules/plover/5.nix @@ -53,10 +53,16 @@ buildPythonPackage (finalAttrs: { # pythonRelaxDeps seemingly doesn't work here postPatch = '' sed -i 's/,<77//g' pyproject.toml - sed -i /PySide6-Essentials/d pyproject.toml ''; - pythonRelaxDeps = [ "xkbcommon" ]; + pythonRelaxDeps = [ + "xkbcommon" + ]; + + pythonRemoveDeps = [ + # We currently don't have it in Nixpkgs. + "PySide6-Essentials" + ]; build-system = [ babel From 22ecf4e4ab34caa7d5669d39e11bc5917d5aba65 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Sat, 13 Jun 2026 14:46:24 +0800 Subject: [PATCH 2/4] plover_4, plover_5: add optional-dependencies.gui-qt --- pkgs/development/python-modules/plover/4.nix | 5 +++++ pkgs/development/python-modules/plover/5.nix | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/plover/4.nix b/pkgs/development/python-modules/plover/4.nix index bda985cb0122..a6c0b57df1bb 100644 --- a/pkgs/development/python-modules/plover/4.nix +++ b/pkgs/development/python-modules/plover/4.nix @@ -56,6 +56,11 @@ buildPythonPackage (finalAttrs: { wcwidth xlib ]; + optional-dependencies = { + gui-qt = [ + pyqt5 + ]; + }; nativeBuildInputs = [ wrapQtAppsHook ]; diff --git a/pkgs/development/python-modules/plover/5.nix b/pkgs/development/python-modules/plover/5.nix index ed3a329559bc..59fab4acfe51 100644 --- a/pkgs/development/python-modules/plover/5.nix +++ b/pkgs/development/python-modules/plover/5.nix @@ -110,6 +110,12 @@ buildPythonPackage (finalAttrs: { pyobjc-framework-Cocoa pyobjc-framework-Quartz ]; + optional-dependencies = { + gui-qt = [ + # TODO(@ShamrockLee): use PySide6-Essentials once available + pyside6 + ]; + }; nativeBuildInputs = [ wrapQtAppsHook ]; From 10fdfd69124a46a216cbb0c888492855718d4236 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Sat, 13 Jun 2026 19:20:46 +0800 Subject: [PATCH 3/4] python3Packages.plover-combo: init at 2.0.0-unstable-2025-09-11 Add plover-combo to test plover_5's plover_build_utils.setup.BuildUi --- .../python-modules/plover-combo/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/plover-combo/default.nix diff --git a/pkgs/development/python-modules/plover-combo/default.nix b/pkgs/development/python-modules/plover-combo/default.nix new file mode 100644 index 000000000000..1f9d43488c21 --- /dev/null +++ b/pkgs/development/python-modules/plover-combo/default.nix @@ -0,0 +1,52 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + plover, + setuptools, + wheel, + nix-update-script, +}: + +buildPythonPackage (finalAttrs: { + pname = "plover-combo"; + version = "2.0.0-unstable-2025-09-11"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "opensteno"; + repo = "plover_combo"; + rev = "82e4b498bd0d7878af4e60fd26453362f41132a8"; + hash = "sha256-GCRfoYu/LZDIGs/9RXDCcTEke3PHMifBEuDUrGH/Juc="; + }; + + build-system = [ + plover + setuptools + wheel + ]; + + dependency = [ + plover + ] + ++ plover.optional-dependencies.gui-qt; + + pythonImportsCheck = [ + "plover_combo" + + # Modules providing Plover entry points + "plover_combo.combo_ui" + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Combo Mode for Plover"; + homepage = "https://github.com/opensteno/plover_combo"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + ShamrockLee + ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 921e63b948ed..9eceee316663 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12823,6 +12823,8 @@ self: super: with self; { # https://github.com/opensteno/plover_plugins_registry/blob/master/unsupported.json plover = plover_5; + plover-combo = callPackage ../development/python-modules/plover-combo { }; + plover-dict-commands = callPackage ../development/python-modules/plover-dict-commands { }; plover-lapwing-aio = callPackage ../development/python-modules/plover-lapwing-aio { }; From 428dff617c5f2ed04b045803463df27a6e9a3859 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Sat, 13 Jun 2026 19:28:53 +0800 Subject: [PATCH 4/4] plover_5: fix plover_build_utils.setup pyside6-rcc and pyside6-uic invocation --- pkgs/development/python-modules/plover/5.nix | 33 +++++++++++--------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/plover/5.nix b/pkgs/development/python-modules/plover/5.nix index 59fab4acfe51..beb9354a4ec8 100644 --- a/pkgs/development/python-modules/plover/5.nix +++ b/pkgs/development/python-modules/plover/5.nix @@ -36,6 +36,20 @@ pyobjc-core, }: +let + # Replacement for missing pyside6-essentials tools, + # workaround for https://github.com/NixOS/nixpkgs/issues/277849. + # Ideally this would be solved in pyside6 itself but I spent four + # hours trying to untangle its build system before giving up. If + # anyone wants to spend the time fixing it feel free to request + # me (@Pandapip1) as a reviewer. + pyside-tools-rcc = buildPackages.writeShellScriptBin "pyside6-rcc" '' + exec ${buildPackages.qt6.qtbase}/libexec/rcc -g python "$@" + ''; + pyside-tools-uic = buildPackages.writeShellScriptBin "pyside6-uic" '' + exec ${buildPackages.qt6.qtbase}/libexec/uic -g python "$@" + ''; +in buildPythonPackage (finalAttrs: { __structuredAttrs = true; @@ -50,9 +64,13 @@ buildPythonPackage (finalAttrs: { hash = "sha256-1NpZmUDq806geKANqswPYglHwInxum/c/Hxq7JhTpbc="; }; - # pythonRelaxDeps seemingly doesn't work here postPatch = '' + # pythonRelaxDeps doesn't work for build-system dependencies sed -i 's/,<77//g' pyproject.toml + + substituteInPlace plover_build_utils/setup.py \ + --replace-fail "pyside6-rcc" ${lib.getExe pyside-tools-rcc} \ + --replace-fail "pyside6-uic" ${lib.getExe pyside-tools-uic} ''; pythonRelaxDeps = [ @@ -69,19 +87,6 @@ buildPythonPackage (finalAttrs: { setuptools pyside6 wheel - - # Replacement for missing pyside6-essentials tools, - # workaround for https://github.com/NixOS/nixpkgs/issues/277849. - # Ideally this would be solved in pyside6 itself but I spent four - # hours trying to untangle its build system before giving up. If - # anyone wants to spend the time fixing it feel free to request - # me (@Pandapip1) as a reviewer. - (buildPackages.writeShellScriptBin "pyside6-uic" '' - exec ${qtbase}/libexec/uic -g python "$@" - '') - (buildPackages.writeShellScriptBin "pyside6-rcc" '' - exec ${qtbase}/libexec/rcc -g python "$@" - '') ]; dependencies = [ appdirs