2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy27
|
|
|
|
, fetchPypi
|
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, dbus
|
2021-06-28 23:13:55 +00:00
|
|
|
, lndir
|
|
|
|
, dbus-python
|
|
|
|
, sip
|
2022-02-20 05:27:41 +00:00
|
|
|
, pyqt5_sip
|
2021-06-28 23:13:55 +00:00
|
|
|
, pyqt-builder
|
|
|
|
, libsForQt5
|
|
|
|
, withConnectivity ? false
|
|
|
|
, withMultimedia ? false
|
|
|
|
, withWebKit ? false
|
|
|
|
, withWebSockets ? false
|
2022-01-27 00:19:43 +00:00
|
|
|
, withLocation ? false
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
buildPythonPackage rec {
|
2020-06-02 18:00:15 +00:00
|
|
|
pname = "PyQt5";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "5.15.4";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
2020-06-02 18:00:15 +00:00
|
|
|
inherit pname version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "1gp5jz71nmg58zsm1h4vzhcphf36rbz37qgsfnzal76i1mz5js9a";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
nativeBuildInputs = with libsForQt5; [
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
qmake
|
|
|
|
lndir
|
|
|
|
sip
|
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
qtdeclarative
|
|
|
|
qtwebchannel
|
|
|
|
]
|
|
|
|
++ lib.optional withConnectivity qtconnectivity
|
|
|
|
++ lib.optional withMultimedia qtmultimedia
|
|
|
|
++ lib.optional withWebKit qtwebkit
|
|
|
|
++ lib.optional withWebSockets qtwebsockets
|
2022-01-27 00:19:43 +00:00
|
|
|
++ lib.optional withLocation qtlocation
|
2020-04-24 23:36:52 +00:00
|
|
|
;
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
buildInputs = with libsForQt5; [
|
2020-04-24 23:36:52 +00:00
|
|
|
dbus
|
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
qtdeclarative
|
2021-06-28 23:13:55 +00:00
|
|
|
pyqt-builder
|
2020-04-24 23:36:52 +00:00
|
|
|
]
|
|
|
|
++ lib.optional withConnectivity qtconnectivity
|
|
|
|
++ lib.optional withWebKit qtwebkit
|
|
|
|
++ lib.optional withWebSockets qtwebsockets
|
2022-01-27 00:19:43 +00:00
|
|
|
++ lib.optional withLocation qtlocation
|
2020-04-24 23:36:52 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
dbus-python
|
2021-06-28 23:13:55 +00:00
|
|
|
pyqt5_sip
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [
|
2021-06-28 23:13:55 +00:00
|
|
|
# Fix some wrong assumptions by ./project.py
|
2020-04-24 23:36:52 +00:00
|
|
|
# TODO: figure out how to send this upstream
|
|
|
|
./pyqt5-fix-dbus-mainloop-support.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = {
|
2022-02-20 05:27:41 +00:00
|
|
|
inherit sip pyqt5_sip;
|
2020-04-24 23:36:52 +00:00
|
|
|
multimediaEnabled = withMultimedia;
|
|
|
|
webKitEnabled = withWebKit;
|
|
|
|
WebSocketsEnabled = withWebSockets;
|
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
dontConfigure = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
# Checked using pythonImportsCheck
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"PyQt5"
|
|
|
|
"PyQt5.QtCore"
|
|
|
|
"PyQt5.QtQml"
|
|
|
|
"PyQt5.QtWidgets"
|
|
|
|
"PyQt5.QtGui"
|
|
|
|
]
|
2020-04-24 23:36:52 +00:00
|
|
|
++ lib.optional withWebSockets "PyQt5.QtWebSockets"
|
|
|
|
++ lib.optional withWebKit "PyQt5.QtWebKit"
|
|
|
|
++ lib.optional withMultimedia "PyQt5.QtMultimedia"
|
|
|
|
++ lib.optional withConnectivity "PyQt5.QtConnectivity"
|
2022-01-27 00:19:43 +00:00
|
|
|
++ lib.optional withLocation "PyQt5.QtPositioning"
|
2021-02-05 17:12:51 +00:00
|
|
|
;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for Qt5";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://riverbankcomputing.com/";
|
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.mesaPlatforms;
|
|
|
|
maintainers = with maintainers; [ sander ];
|
|
|
|
};
|
|
|
|
}
|