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