From 02bfcdf263a02723a7a93d1f7ddbf22c24965eb6 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 27 Mar 2026 15:07:38 +0100 Subject: [PATCH 1/5] libsForQt5.pyotherside: Rename from pyotherside So a Qt6 build can be added. --- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 -- pkgs/top-level/qt5-packages.nix | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a0449bd200b5..a093826a3754 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1738,6 +1738,7 @@ mapAliases { pyCA = warnAlias "'pyCA' was renamed to 'pyca'" pyca; # Added 2026-02-12 pyload-ng = throw "'pyload-ng' has been removed due to vulnerabilities and being unmaintained"; # Added 2026-03-21 pyo3-pack = throw "'pyo3-pack' has been renamed to/replaced by 'maturin'"; # Converted to throw 2025-10-27 + pyotherside = warnAlias "'pyotherside' has been renamed to 'libsForQt5.pyotherside'."; # Added 2026-03-27 pypolicyd-spf = throw "'pypolicyd-spf' has been renamed to/replaced by 'spf-engine'"; # Converted to throw 2025-10-27 python3Full = throw "python3Full has been removed. Bluetooth support is now enabled by default. The tkinter package is available within the package set."; # Added 2025-08-30 python311Full = throw "python311Full has been removed. Bluetooth support is now enabled by default. The tkinter package is available within the package set."; # Added 2025-08-30 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1a8ee13882e8..8e120ad74d2a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7117,8 +7117,6 @@ with pkgs; pth = if stdenv.hostPlatform.isMusl then npth else gnupth; - pyotherside = libsForQt5.callPackage ../development/libraries/pyotherside { }; - qbs = libsForQt5.callPackage ../development/tools/build-managers/qbs { }; qdjango = libsForQt5.callPackage ../development/libraries/qdjango { }; diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index 1a52c4faa1be..cc23ae2fbb92 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -154,6 +154,8 @@ makeScopeWithSplicing' { pulseaudio-qt = callPackage ../development/libraries/pulseaudio-qt { }; + pyotherside = callPackage ../development/libraries/pyotherside { }; + qca = callPackage ../development/libraries/qca { inherit (libsForQt5) qtbase; }; From 678d29f449851bc56a826e2a22ec7c8617aa97b6 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 27 Mar 2026 15:17:17 +0100 Subject: [PATCH 2/5] qt6Packages.pyotherside: init at 1.6.2 --- pkgs/development/libraries/pyotherside/default.nix | 10 +++++++--- pkgs/top-level/aliases.nix | 2 +- pkgs/top-level/qt6-packages.nix | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/pyotherside/default.nix b/pkgs/development/libraries/pyotherside/default.nix index 481093cbe188..c9f1412b0457 100644 --- a/pkgs/development/libraries/pyotherside/default.nix +++ b/pkgs/development/libraries/pyotherside/default.nix @@ -5,11 +5,15 @@ python3, qmake, qtbase, - qtquickcontrols, + qtdeclarative, + qtquickcontrols ? null, # Qt6: merged into qtdeclarative qtsvg, ncurses, }: +let + withQt6 = lib.strings.versionAtLeast qtbase.version "6"; +in stdenv.mkDerivation rec { pname = "pyotherside"; version = "1.6.2"; @@ -25,7 +29,7 @@ stdenv.mkDerivation rec { buildInputs = [ python3 qtbase - qtquickcontrols + (if withQt6 then qtdeclarative else qtquickcontrols) qtsvg ncurses ]; @@ -36,7 +40,7 @@ stdenv.mkDerivation rec { installTargets = [ "sub-src-install_subtargets" ]; meta = { - description = "Asynchronous Python 3 Bindings for Qt 5"; + description = "Asynchronous Python 3 Bindings for Qt ${lib.versions.major qtbase.version}"; homepage = "https://thp.io/2011/pyotherside/"; license = lib.licenses.isc; maintainers = [ lib.maintainers.mic92 ]; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a093826a3754..7c03c05c46ae 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1738,7 +1738,7 @@ mapAliases { pyCA = warnAlias "'pyCA' was renamed to 'pyca'" pyca; # Added 2026-02-12 pyload-ng = throw "'pyload-ng' has been removed due to vulnerabilities and being unmaintained"; # Added 2026-03-21 pyo3-pack = throw "'pyo3-pack' has been renamed to/replaced by 'maturin'"; # Converted to throw 2025-10-27 - pyotherside = warnAlias "'pyotherside' has been renamed to 'libsForQt5.pyotherside'."; # Added 2026-03-27 + pyotherside = warnAlias "'pyotherside' has been renamed to 'libsForQt5.pyotherside'. A Qt6 build is available at 'qt6Packages.pyotherside'."; # Added 2026-03-27 pypolicyd-spf = throw "'pypolicyd-spf' has been renamed to/replaced by 'spf-engine'"; # Converted to throw 2025-10-27 python3Full = throw "python3Full has been removed. Bluetooth support is now enabled by default. The tkinter package is available within the package set."; # Added 2025-08-30 python311Full = throw "python311Full has been removed. Bluetooth support is now enabled by default. The tkinter package is available within the package set."; # Added 2025-08-30 diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index cc1b5fec45b7..d17adae73183 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -92,6 +92,8 @@ makeScopeWithSplicing' { maplibre-native-qt = callPackage ../development/libraries/maplibre-native-qt { }; + pyotherside = callPackage ../development/libraries/pyotherside { }; + qca = callPackage ../development/libraries/qca { inherit (qt6) qtbase qt5compat; }; From e7a57acdb059b93b542af642bc533159641002a9 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 27 Mar 2026 15:45:39 +0100 Subject: [PATCH 3/5] {libsForQt5,qt6Packages}.pyotherside: Enable tests qtquicktests rely on installed directory structure to load the built QML module, so running those in installCheckPhase. --- .../libraries/pyotherside/default.nix | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/pkgs/development/libraries/pyotherside/default.nix b/pkgs/development/libraries/pyotherside/default.nix index c9f1412b0457..a27be3b9908b 100644 --- a/pkgs/development/libraries/pyotherside/default.nix +++ b/pkgs/development/libraries/pyotherside/default.nix @@ -25,6 +25,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-2OYVULNW9EzssqodiVtL2EmhTSbefXpLkub3zFvNwNo="; }; + postPatch = '' + substituteInPlace qtquicktests/run \ + --replace-fail \ + '-plugins ../src' \ + '-plugins ../src -import $out/${qtbase.qtQmlPrefix} -import ${lib.getBin qtdeclarative}/${qtbase.qtQmlPrefix}' + ''; + nativeBuildInputs = [ qmake ]; buildInputs = [ python3 @@ -39,6 +46,30 @@ stdenv.mkDerivation rec { patches = [ ./qml-path.patch ]; installTargets = [ "sub-src-install_subtargets" ]; + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + + checkPhase = '' + runHook preCheck + + export QT_QPA_PLATFORM=minimal + export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix} + ./tests/tests + + runHook postCheck + ''; + + doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + + installCheckPhase = '' + runHook preInstallCheck + + pushd qtquicktests + ./run + popd + + runHook postInstallCheck + ''; + meta = { description = "Asynchronous Python 3 Bindings for Qt ${lib.versions.major qtbase.version}"; homepage = "https://thp.io/2011/pyotherside/"; From ddfce04d9e943cfe86d70c206eb684250cc7ff03 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 27 Mar 2026 15:49:04 +0100 Subject: [PATCH 4/5] {libsForQt5,qt6Packages}.pyotherside: Set meta.platforms --- pkgs/development/libraries/pyotherside/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/pyotherside/default.nix b/pkgs/development/libraries/pyotherside/default.nix index a27be3b9908b..5e8ab41b8c65 100644 --- a/pkgs/development/libraries/pyotherside/default.nix +++ b/pkgs/development/libraries/pyotherside/default.nix @@ -75,5 +75,6 @@ stdenv.mkDerivation rec { homepage = "https://thp.io/2011/pyotherside/"; license = lib.licenses.isc; maintainers = [ lib.maintainers.mic92 ]; + platforms = lib.platforms.unix ++ lib.platforms.windows; }; } From 99c94f59a7eb11fb00e19122dda59325d69dd6bc Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Mon, 13 Apr 2026 16:37:07 +0200 Subject: [PATCH 5/5] {libsForQt5,qt6Packages}.pyotherside: Try to fix qtquicktests on Darwin On Darwin, an Application Bundle is created for the qtquicktests binary. Patch the exec call to run the binary within the Bundle. --- pkgs/development/libraries/pyotherside/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/pyotherside/default.nix b/pkgs/development/libraries/pyotherside/default.nix index 5e8ab41b8c65..33fe7ee169e0 100644 --- a/pkgs/development/libraries/pyotherside/default.nix +++ b/pkgs/development/libraries/pyotherside/default.nix @@ -27,6 +27,14 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace qtquicktests/run \ + --replace-fail \ + 'exec ./qtquicktests' \ + 'exec ./${ + if stdenv.hostPlatform.isDarwin then + "qtquicktests.app/Contents/MacOS/qtquicktests" + else + "qtquicktests" + }' \ --replace-fail \ '-plugins ../src' \ '-plugins ../src -import $out/${qtbase.qtQmlPrefix} -import ${lib.getBin qtdeclarative}/${qtbase.qtQmlPrefix}'