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