PyQt6: init at 6.4.0
This commit is contained in:
parent
b5f31454a3
commit
1824a128a1
138
pkgs/development/python-modules/pyqt/6.x.nix
Normal file
138
pkgs/development/python-modules/pyqt/6.x.nix
Normal file
@ -0,0 +1,138 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, isPy27
|
||||
, fetchPypi
|
||||
, pkg-config
|
||||
, dbus
|
||||
, lndir
|
||||
, setuptools
|
||||
, dbus-python
|
||||
, sip
|
||||
, pyqt6-sip
|
||||
, pyqt-builder
|
||||
, qt6Packages
|
||||
, pythonOlder
|
||||
, withMultimedia ? true
|
||||
, withWebSockets ? true
|
||||
# FIXME: Once QtLocation is available for Qt6 enable this
|
||||
# https://bugreports.qt.io/browse/QTBUG-96795
|
||||
#, withLocation ? true
|
||||
# Not currently part of PyQt6
|
||||
#, withConnectivity ? true
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "PyQt6";
|
||||
version = "6.4.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-kTkkab4fSRkF+p54+k5AWaiathbd8uz9UlvB1lwmu5M=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix some wrong assumptions by ./project.py
|
||||
# TODO: figure out how to send this upstream
|
||||
# FIXME: make a version for PyQt6?
|
||||
# ./pyqt5-fix-dbus-mainloop-support.patch
|
||||
# confirm license when installing via pyqt6_sip
|
||||
./pyqt5-confirm-license.patch
|
||||
];
|
||||
|
||||
# be more verbose
|
||||
postPatch = ''
|
||||
cat >> pyproject.toml <<EOF
|
||||
[tool.sip.project]
|
||||
verbose = true
|
||||
EOF
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
# HACK: paralellize compilation of make calls within pyqt's setup.py
|
||||
# pkgs/stdenv/generic/setup.sh doesn't set this for us because
|
||||
# make gets called by python code and not its build phase
|
||||
# format=pyproject means the pip-build-hook hook gets used to build this project
|
||||
# pkgs/development/interpreters/python/hooks/pip-build-hook.sh
|
||||
# does not use the enableParallelBuilding flag
|
||||
postUnpack = ''
|
||||
export MAKEFLAGS+=" -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES"
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
nativeBuildInputs = with qt6Packages; [
|
||||
pkg-config
|
||||
lndir
|
||||
sip
|
||||
qtbase
|
||||
qtsvg
|
||||
qtdeclarative
|
||||
qtwebchannel
|
||||
qmake
|
||||
qtquick3d
|
||||
qtquicktimeline
|
||||
]
|
||||
# ++ lib.optional withConnectivity qtconnectivity
|
||||
++ lib.optional withMultimedia qtmultimedia
|
||||
++ lib.optional withWebSockets qtwebsockets
|
||||
# ++ lib.optional withLocation qtlocation
|
||||
;
|
||||
|
||||
buildInputs = with qt6Packages; [
|
||||
dbus
|
||||
qtbase
|
||||
qtsvg
|
||||
qtdeclarative
|
||||
pyqt-builder
|
||||
qtquick3d
|
||||
qtquicktimeline
|
||||
]
|
||||
# ++ lib.optional withConnectivity qtconnectivity
|
||||
++ lib.optional withWebSockets qtwebsockets
|
||||
# ++ lib.optional withLocation qtlocation
|
||||
;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dbus-python
|
||||
pyqt6-sip
|
||||
setuptools
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit sip pyqt6-sip;
|
||||
multimediaEnabled = withMultimedia;
|
||||
WebSocketsEnabled = withWebSockets;
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
# Checked using pythonImportsCheck, has no tests
|
||||
doCheck = true;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"PyQt6"
|
||||
"PyQt6.QtCore"
|
||||
"PyQt6.QtQml"
|
||||
"PyQt6.QtWidgets"
|
||||
"PyQt6.QtGui"
|
||||
"PyQt6.QtQuick"
|
||||
]
|
||||
++ lib.optional withWebSockets "PyQt6.QtWebSockets"
|
||||
++ lib.optional withMultimedia "PyQt6.QtMultimedia"
|
||||
# ++ lib.optional withConnectivity "PyQt6.QtConnectivity"
|
||||
# ++ lib.optional withLocation "PyQt6.QtPositioning"
|
||||
;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for Qt6";
|
||||
homepage = "https://riverbankcomputing.com/";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.mesaPlatforms;
|
||||
maintainers = with maintainers; [ LunNova ];
|
||||
};
|
||||
}
|
28
pkgs/development/python-modules/pyqt/pyqt6-sip.nix
Normal file
28
pkgs/development/python-modules/pyqt/pyqt6-sip.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyqt6-sip";
|
||||
version = "13.4.0";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "PyQt6_sip";
|
||||
inherit version;
|
||||
sha256 = "sha256-bYej7lhy11EbdpV9aKMhCTUsrzt6QqAdnuIAMrNQ2Xk=";
|
||||
};
|
||||
|
||||
# There is no test code and the check phase fails with:
|
||||
# > error: could not create 'PyQt5/sip.cpython-38-x86_64-linux-gnu.so': No such file or directory
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "PyQt6.sip" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for Qt5";
|
||||
homepage = "https://www.riverbankcomputing.com/software/sip/";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.mesaPlatforms;
|
||||
maintainers = with maintainers; [ LunNova ];
|
||||
};
|
||||
}
|
@ -8367,6 +8367,10 @@ in {
|
||||
withWebKit = true;
|
||||
};
|
||||
|
||||
pyqt6 = callPackage ../development/python-modules/pyqt/6.x.nix { };
|
||||
|
||||
pyqt6-sip = callPackage ../development/python-modules/pyqt/pyqt6-sip.nix { };
|
||||
|
||||
pyqtgraph = callPackage ../development/python-modules/pyqtgraph { };
|
||||
|
||||
pyqtwebengine = pkgs.libsForQt5.callPackage ../development/python-modules/pyqtwebengine {
|
||||
|
Loading…
Reference in New Issue
Block a user