Change:
<ins> --- a/ApiExtractor/clangparser/compilersupport.cpp +++ b/ApiExtractor/clangparser/compilersupport.cpp @@ -16,6 +16,7 @@ #include <QtCore/QStandardPaths> #include <QtCore/QStringList> #include <QtCore/QVersionNumber> +#include <QtCore/QRegularExpression> #include <clang-c/Index.h> @@ -341,6 +342,13 @@ QByteArrayList emulatedCompilerOptions() { QByteArrayList result; HeaderPaths headerPaths; + +    bool isNixDebug = qgetenv("NIX_DEBUG").toInt() > 0; +    // examples: +    // /nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-qtsensors-6.4.2-dev/include +    // /nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-qtbase-6.4.2-dev/include +    QRegularExpression qtHeaderRegex(uR"(/[0-9a-z]{32}-qt[a-z0-9]+-)"_s); + switch (compiler()) { case Compiler::Msvc: result.append(QByteArrayLiteral("-fms-compatibility-version=19.26.28806")); @@ -352,9 +360,30 @@ QByteArrayList emulatedCompilerOptions() appendClangBuiltinIncludes(&headerPaths); break; case Compiler::Clang: -        headerPaths.append(gppInternalIncludePaths(compilerFromCMake(u"clang++"_s))); +    // fix: error: cannot jump from switch statement to this case label: case Compiler::Gpp +    // note: jump bypasses variable initialization: const HeaderPaths clangPaths = +    { +        //headerPaths.append(gppInternalIncludePaths(compilerFromCMake(u"clang++"_s))); +        // fix: qt.shiboken: x is specified in typesystem, but not defined. This could potentially lead to compilation errors. +        // PySide requires that Qt headers are not -isystem +        // https://bugreports.qt.io/browse/PYSIDE-787 +        const HeaderPaths clangPaths = gppInternalIncludePaths(compilerFromCMake(u"clang++"_qs)); +        for (const HeaderPath &h : clangPaths) { +            auto match = qtHeaderRegex.match(QString::fromUtf8(h.path)); +            if (!match.hasMatch()) { +                if (isNixDebug) +                    qDebug() << "shiboken compilersupport.cpp: found non-qt header: " << h.path; +                // add using -isystem +                headerPaths.append(h); +            } else { +                if (isNixDebug) +                    qDebug() << "shiboken compilersupport.cpp: found qt header: " << h.path; +                headerPaths.append({h.path, HeaderType::Standard}); +            } +        } result.append(noStandardIncludeOption()); break; +    } case Compiler::Gpp: if (needsClangBuiltinIncludes()) appendClangBuiltinIncludes(&headerPaths); @@ -363,8 +392,20 @@ QByteArrayList emulatedCompilerOptions() // <type_traits> etc (g++ 11.3). const HeaderPaths gppPaths = gppInternalIncludePaths(compilerFromCMake(u"g++"_qs)); for (const HeaderPath &h : gppPaths) { -            if (h.path.contains("c++") || h.path.contains("sysroot")) +            // fix: qt.shiboken: x is specified in typesystem, but not defined. This could potentially lead to compilation errors. +            // PySide requires that Qt headers are not -isystem +            // https://bugreports.qt.io/browse/PYSIDE-787 +            auto match = qtHeaderRegex.match(QString::fromUtf8(h.path)); +            if (!match.hasMatch()) { +                if (isNixDebug) +                    qDebug() << "shiboken compilersupport.cpp: found non-qt header: " << h.path; +                // add using -isystem headerPaths.append(h); +            } else { +                if (isNixDebug) +                    qDebug() << "shiboken compilersupport.cpp: found qt header: " << h.path; +                headerPaths.append({h.path, HeaderType::Standard}); +            } } break; } -- 2.39.0 </ins>

Discussion:
: code generator for python bindings to C++ code : python bindings to qt6 (alternative to pyqt6) with qt6 - ping status unknown. i started this some months ago ... homepage URL: source URL: and license: lgpl platforms: all
Just ran into a program I’d like to use that depends on PySide6 – so I’d be curious about having that in nixpkgs too
Also needed for to upgrade past 2.0.13 (currently at 2.0.6 in nixpkgs, latest is 2.0.15). Looks like a WIP PR got closed here:
I'm a real noob but i'm trying to install mtkclient with termux on an android device but it requires shiboken6 and pyside6. any help? ~/mtkclient $ pip install pyside6 ERROR: Could not find a version that satisfies the requirement pyside6 (from versions: none) ERROR: No matching distribution found for pyside6 ~/mtkclient $ pip install pyside Collecting pyside Downloading PySide- (9.3 MB) 9.3/9.3 MB 876.5 kB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. exit code: 1 [1 lines of output] only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)] [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. exit code: 1 See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. ~/mtkclient $
Came across this, too as I wanted to update streamdeck-ui :/ I'm not familiar enough to package pyside6, do you think you could do it and find time to have a look? (the streamdeck update and debugging if needed I can try to do) Even OP got banned (and his PRs closed), the request for the PySide6 is still valid if better I can also create a new / issue for it.