12 stdenv' = if stdenv.cc.isClang then stdenv else llvmPackages.stdenv;
14 stdenv'.mkDerivation rec {
19 # https://download.qt.io/official_releases/QtForPython/shiboken6/
20 url = "https://download.qt.io/official_releases/QtForPython/shiboken6/PySide6-${version}-src/pyside-setup-everywhere-src-${version}.tar.xz";
21 sha256 = "sha256-kNvx0U/NQcmKfL6kS4pJUeENC3mOFUdJdW5JRmVNG6g";
24 sourceRoot = "pyside-setup-everywhere-src-${version}/sources/${pname}";
27 ./fix-include-qt-headers.patch
33 ] ++ lib.optionals stdenv.isLinux [
40 python.pkgs.qt6.qtbase
43 python.pkgs.setuptools
50 # Due to Shiboken.abi3.so being linked to libshiboken6.abi3.so.6.5 in the build tree,
51 # we need to remove the build tree reference from the RPATH and then add the correct
52 # directory to the RPATH. On Linux, the second part is handled by autoPatchelfHook.
53 # https://bugreports.qt.io/browse/PYSIDE-2233
55 echo "fixing RPATH of Shiboken.abi3.so"
56 '' + lib.optionalString stdenv.isDarwin ''
57 install_name_tool -change {@rpath,$out/lib}/libshiboken6.abi3.6.5.dylib $out/${python.sitePackages}/shiboken6/Shiboken.abi3.so
58 '' + lib.optionalString stdenv.isLinux ''
59 patchelf $out/${python.sitePackages}/shiboken6/Shiboken.abi3.so --shrink-rpath --allowed-rpath-prefixes ${builtins.storeDir}
64 ${python.pythonOnBuildForHost.interpreter} setup.py egg_info --build-type=shiboken6
65 cp -r shiboken6.egg-info $out/${python.sitePackages}/
68 dontWrapQtApps = true;
71 description = "Generator for the pyside6 Qt bindings";
72 license = with licenses; [ lgpl3Only gpl2Only gpl3Only ];
73 homepage = "https://wiki.qt.io/Qt_for_Python";
74 maintainers = with maintainers; [ gebner Enzime ];
75 platforms = platforms.all;