Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, cmake 4, ninja 5, qt6 6, python 7, moveBuildTree 8, shiboken6 9, libxcrypt 10}: 11 12stdenv.mkDerivation rec { 13 pname = "pyside6"; 14 15 inherit (shiboken6) version src; 16 17 sourceRoot = "pyside-setup-everywhere-src-${lib.versions.majorMinor version}/sources/${pname}"; 18 19 # FIXME: cmake/Macros/PySideModules.cmake supposes that all Qt frameworks on macOS 20 # reside in the same directory as QtCore.framework, which is not true for Nix. 21 postPatch = lib.optionalString stdenv.isLinux '' 22 # Don't ignore optional Qt modules 23 substituteInPlace cmake/PySideHelpers.cmake \ 24 --replace \ 25 'string(FIND "''${_module_dir}" "''${_core_abs_dir}" found_basepath)' \ 26 'set (found_basepath 0)' 27 ''; 28 29 nativeBuildInputs = [ 30 cmake 31 ninja 32 python 33 ] ++ lib.optionals stdenv.isDarwin [ 34 moveBuildTree 35 ]; 36 37 buildInputs = with qt6; [ 38 # required 39 qtbase 40 ] ++ lib.optionals stdenv.isLinux [ 41 # optional 42 qt3d 43 qtcharts 44 qtconnectivity 45 qtdatavis3d 46 qtdeclarative 47 qthttpserver 48 qtmultimedia 49 qtnetworkauth 50 qtquick3d 51 qtremoteobjects 52 qtscxml 53 qtsensors 54 qtspeech 55 qtsvg 56 qttools 57 qtwebchannel 58 qtwebengine 59 qtwebsockets 60 ]; 61 62 propagatedBuildInputs = [ 63 shiboken6 64 ]; 65 66 cmakeFlags = [ 67 "-DBUILD_TESTS=OFF" 68 ]; 69 70 dontWrapQtApps = true; 71 72 meta = with lib; { 73 description = "Python bindings for Qt"; 74 license = with licenses; [ lgpl3Only gpl2Only gpl3Only ]; 75 homepage = "https://wiki.qt.io/Qt_for_Python"; 76 maintainers = with maintainers; [ gebner Enzime ]; 77 platforms = platforms.all; 78 }; 79}