Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[py]qtwebengine: meta.platforms; use in qutebrowser, calibre #170196

Merged
merged 4 commits into from May 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) [
This conversation was marked as resolved.
Show resolved Hide resolved
# 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;
};
}