2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
cmake,
|
|
|
|
ninja,
|
|
|
|
python,
|
|
|
|
moveBuildTree,
|
|
|
|
shiboken6,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pyside6";
|
|
|
|
|
|
|
|
inherit (shiboken6) version src;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
patches = [
|
|
|
|
# stripped down version of https://github.com/pyside/pyside-setup/commit/a0d68856d67ce6e178e3cfc2fccc236707e02fcd
|
|
|
|
# FIXME: remove in next release
|
|
|
|
./qt-6.7.1.patch
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
sourceRoot = "pyside-setup-everywhere-src-${version}/sources/${pname}";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
# FIXME: cmake/Macros/PySideModules.cmake supposes that all Qt frameworks on macOS
|
|
|
|
# reside in the same directory as QtCore.framework, which is not true for Nix.
|
|
|
|
postPatch = lib.optionalString stdenv.isLinux ''
|
|
|
|
# Don't ignore optional Qt modules
|
|
|
|
substituteInPlace cmake/PySideHelpers.cmake \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail \
|
2023-05-24 13:37:59 +00:00
|
|
|
'string(FIND "''${_module_dir}" "''${_core_abs_dir}" found_basepath)' \
|
|
|
|
'set (found_basepath 0)'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
python
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ moveBuildTree ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs =
|
|
|
|
with python.pkgs.qt6;
|
|
|
|
[
|
|
|
|
# required
|
|
|
|
qtbase
|
|
|
|
python.pkgs.ninja
|
|
|
|
python.pkgs.packaging
|
|
|
|
python.pkgs.setuptools
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isLinux [
|
|
|
|
# optional
|
|
|
|
qt3d
|
|
|
|
qtcharts
|
|
|
|
qtconnectivity
|
|
|
|
qtdatavis3d
|
|
|
|
qtdeclarative
|
|
|
|
qthttpserver
|
|
|
|
qtmultimedia
|
|
|
|
qtnetworkauth
|
|
|
|
qtquick3d
|
|
|
|
qtremoteobjects
|
|
|
|
qtscxml
|
|
|
|
qtsensors
|
|
|
|
qtspeech
|
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
qtwebchannel
|
|
|
|
qtwebengine
|
|
|
|
qtwebsockets
|
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ shiboken6 ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cmakeFlags = [ "-DBUILD_TESTS=OFF" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postInstall = ''
|
|
|
|
cd ../../..
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} setup.py egg_info --build-type=pyside6
|
2023-10-09 19:29:22 +00:00
|
|
|
cp -r PySide6.egg-info $out/${python.sitePackages}/
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for Qt";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
lgpl3Only
|
|
|
|
gpl2Only
|
|
|
|
gpl3Only
|
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://wiki.qt.io/Qt_for_Python";
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
gebner
|
|
|
|
Enzime
|
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|