Skip to content

Commit

Permalink
Merge pull request #170196 from a-m-joseph/qtwebengine-fix-platforms
Browse files Browse the repository at this point in the history
[py]qtwebengine: meta.platforms
  • Loading branch information
AndersonTorres authored May 1, 2022
2 parents 1ed876d + e134ec7 commit e887de8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
6 changes: 5 additions & 1 deletion pkgs/applications/misc/calibre/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ mkDerivation rec {
pillow
pyqt-builder
pyqt5
pyqtwebengine
python
regex
sip
Expand All @@ -114,6 +113,11 @@ mkDerivation rec {
pycryptodome
# the following are distributed with calibre, but we use upstream instead
odfpy
] ++ lib.optionals (lib.lists.any (p: p == stdenv.hostPlatform.system) pyqtwebengine.meta.platforms) [
# much of calibre's functionality is usable without a web
# browser, so we enable building on platforms which qtwebengine
# does not support by simply omitting qtwebengine.
pyqtwebengine
] ++ lib.optional (unrarSupport) unrardll
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,6 @@ in mkDerivationWith python3Packages.buildPythonApplication rec {
description = "Keyboard-focused browser with a minimal GUI";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jagajaga rnhmjoj ebzzry dotlambda ];
inherit (backendPackage.meta) platforms;
};
}
17 changes: 16 additions & 1 deletion pkgs/development/libraries/qt-5/modules/qtwebengine.nix
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,22 @@ qtModule {
meta = with lib; {
description = "A web engine based on the Chromium web browser";
maintainers = with maintainers; [ matthewbauer ];
platforms = platforms.unix;

# qtwebengine-5.15.8: "QtWebEngine can only be built for x86,
# x86-64, ARM, Aarch64, and MIPSel architectures."
platforms =
lib.trivial.pipe lib.systems.doubles.all [
(map (double: lib.systems.elaborate { system = double; }))
(lib.lists.filter (parsedPlatform: with parsedPlatform;
isUnix &&
(isx86_32 ||
isx86_64 ||
isAarch32 ||
isAarch64 ||
(isMips && isLittleEndian))))
(map (plat: plat.system))
];

# This build takes a long time; particularly on slow architectures
timeout = 24 * 3600;
# we are still stuck with MacOS SDK 10.12 on x86_64-darwin
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/pyqtwebengine/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ in buildPythonPackage rec {
description = "Python bindings for Qt5";
homepage = "http://www.riverbankcomputing.co.uk";
license = licenses.gpl3;
platforms = platforms.mesaPlatforms;
platforms = lib.lists.intersectLists qtwebengine.meta.platforms platforms.mesaPlatforms;
};
}

0 comments on commit e887de8

Please sign in to comment.