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