qt5.pyqtwebengine: fix cross

This commit is contained in:
Adam Joseph 2023-11-03 22:20:23 -07:00 committed by Adam Joseph
parent 80c4676224
commit b7b8175963

View File

@ -1,13 +1,14 @@
{ lib, stdenv, pythonPackages, fetchPypi, pkg-config
, qmake, qtbase, qtsvg, qtwebengine
, qmake, qtbase, qtsvg, qtwebengine, qtwebchannel, qtdeclarative
, wrapQtAppsHook
, darwin
, buildPackages
}:
let
inherit (pythonPackages) buildPythonPackage python isPy27 pyqt5 sip pyqt-builder;
inherit (darwin) autoSignDarwinBinariesHook;
in buildPythonPackage rec {
in buildPythonPackage (rec {
pname = "PyQtWebEngine";
version = "5.15.4";
format = "pyproject";
@ -29,12 +30,18 @@ in buildPythonPackage rec {
nativeBuildInputs = [
pkg-config
qmake
] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
sip
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
buildPackages.python3Packages.sip
] ++ [
qtbase
qtsvg
qtwebengine
pyqt-builder
pythonPackages.setuptools
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
qtdeclarative
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
autoSignDarwinBinariesHook
];
@ -44,6 +51,9 @@ in buildPythonPackage rec {
qtbase
qtsvg
qtwebengine
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
qtwebchannel
qtdeclarative
];
propagatedBuildInputs = [ pyqt5 ];
@ -71,6 +81,13 @@ in buildPythonPackage rec {
description = "Python bindings for Qt5";
homepage = "http://www.riverbankcomputing.co.uk";
license = licenses.gpl3;
platforms = lib.lists.intersectLists qtwebengine.meta.platforms platforms.mesaPlatforms;
hydraPlatforms = lib.lists.intersectLists qtwebengine.meta.platforms platforms.mesaPlatforms;
};
}
} // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
# TODO: figure out why the env hooks aren't adding these inclusions automatically
env.NIX_CFLAGS_COMPILE =
lib.concatStringsSep " " [
"-I${lib.getDev qtbase}/include/QtPrintSupport/"
"-I${lib.getDev qtwebchannel}/include/QtWebChannel/"
];
})