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; 16 17 patches = [ ./nix_compile_cflags.patch ]; 18 19 postPatch = '' 20 cd sources/shiboken2 21 ''; 22 23 CLANG_INSTALL_DIR = llvmPackages_15.libclang.out; 24 25 nativeBuildInputs = [ cmake ]; 26 27 buildInputs = 28 [ 29 llvmPackages_15.libclang 30 python 31 python.pkgs.setuptools 32 qt5.qtbase 33 qt5.qtxmlpatterns 34 ] 35 ++ (lib.optionals (python.pythonOlder "3.9") [ 36 # see similar issue: 202262 37 # libxcrypt is required for crypt.h for building older python modules 38 libxcrypt 39 ]); 40 41 cmakeFlags = [ "-DBUILD_TESTS=OFF" ]; 42 43 dontWrapQtApps = true; 44 45 postInstall = '' 46 cd ../../.. 47 ${python.pythonOnBuildForHost.interpreter} setup.py egg_info --build-type=shiboken2 48 cp -r shiboken2.egg-info $out/${python.sitePackages}/ 49 rm $out/bin/shiboken_tool.py 50 ''; 51 52 meta = with lib; { 53 description = "Generator for the PySide2 Qt bindings"; 54 mainProgram = "shiboken2"; 55 license = with licenses; [ 56 gpl2 57 lgpl21 58 ]; 59 homepage = "https://wiki.qt.io/Qt_for_Python"; 60 maintainers = with maintainers; [ gebner ]; 61 broken = stdenv.isDarwin; 62 }; 63}