1{ 2 python, 3 lib, 4 stdenv, 5 pyside2, 6 cmake, 7 qt5, 8 libxcrypt, 9 llvmPackages_15, 10}: 11 12stdenv.mkDerivation { 13 pname = "shiboken2"; 14 15 inherit (pyside2) version src patches; 16 17 postPatch = '' 18 cd sources/shiboken2 19 ''; 20 21 CLANG_INSTALL_DIR = llvmPackages_15.libclang.out; 22 23 nativeBuildInputs = [ 24 cmake 25 (python.withPackages ( 26 ps: with ps; [ 27 distutils 28 setuptools 29 ] 30 )) 31 qt5.qmake 32 ]; 33 34 buildInputs = 35 [ 36 llvmPackages_15.libclang 37 python.pkgs.setuptools 38 qt5.qtbase 39 qt5.qtxmlpatterns 40 ] 41 ++ (lib.optionals (python.pythonOlder "3.9") [ 42 # see similar issue: 202262 43 # libxcrypt is required for crypt.h for building older python modules 44 libxcrypt 45 ]); 46 47 cmakeFlags = [ "-DBUILD_TESTS=OFF" ]; 48 49 dontWrapQtApps = true; 50 51 postInstall = '' 52 cd ../../.. 53 ${python.pythonOnBuildForHost.interpreter} setup.py egg_info --build-type=shiboken2 54 cp -r shiboken2.egg-info $out/${python.sitePackages}/ 55 rm $out/bin/shiboken_tool.py 56 ''; 57 58 meta = with lib; { 59 description = "Generator for the PySide2 Qt bindings"; 60 mainProgram = "shiboken2"; 61 license = with licenses; [ 62 gpl2 63 lgpl21 64 ]; 65 homepage = "https://wiki.qt.io/Qt_for_Python"; 66 maintainers = with maintainers; [ ]; 67 }; 68}