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

qt5: fix cross #264965

Merged
17 commits merged into from Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
26 changes: 26 additions & 0 deletions lib/systems/inspect.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,32 @@ rec {
];
};

# given two patterns, return a pattern which is their logical AND.
# Since a pattern is a list-of-disjuncts, this needs to
patternLogicalAnd = pat1_: pat2_:
let
# patterns can be either a list or a (bare) singleton; turn
# them into singletons for uniform handling
pat1 = lib.toList pat1_;
pat2 = lib.toList pat2_;
in
lib.concatMap (attr1:
map (attr2:
lib.recursiveUpdateUntil
(path: subattr1: subattr2:
if (builtins.intersectAttrs subattr1 subattr2) == {} || subattr1 == subattr2
then true
else throw ''
pattern conflict at path ${toString path}:
${builtins.toJSON subattr1}
${builtins.toJSON subattr2}
'')
attr1
attr2
)
pat2)
pat1;

matchAnyAttrs = patterns:
if builtins.isList patterns then attrs: any (pattern: matchAttrs pattern attrs) patterns
else matchAttrs patterns;
Expand Down
9 changes: 7 additions & 2 deletions pkgs/applications/networking/browsers/qutebrowser/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
}:

let
isQt6 = lib.versions.major qtbase.version == "6";
pdfjs = let
version = "3.9.179";
in
Expand Down Expand Up @@ -50,10 +51,14 @@ python3.pkgs.buildPythonApplication {
];

propagatedBuildInputs = with python3.pkgs; ([
pyyaml pyqt6-webengine jinja2 pygments
pyyaml (if isQt6 then pyqt6-webengine else pyqtwebengine) jinja2 pygments
# scripts and userscripts libs
tldextract beautifulsoup4
readability-lxml pykeepass stem
readability-lxml pykeepass
] ++ lib.optionals ((builtins.tryEval stem.outPath).success) [
# error: stem-1.8.2 not supported for interpreter python3.11
stem
] ++ [
pynacl
# extensive ad blocking
adblock
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/libraries/qt-5/5.15/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -339,5 +339,6 @@ let

finalScope = baseScope.overrideScope(final: prev: {
qttranslations = bootstrapScope.qttranslations;
qutebrowser = final.callPackage ../../../../applications/networking/browsers/qutebrowser { };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applications don't belong here so I suggest #251671.

});
in finalScope
10 changes: 9 additions & 1 deletion pkgs/development/libraries/qt-5/modules/qtdeclarative.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ qtModule, lib, python3, qtbase, qtsvg }:
{ lib
, stdenv
, qtModule, python3, qtbase, qtsvg }:

qtModule {
pname = "qtdeclarative";
Expand All @@ -21,4 +23,10 @@ qtModule {
"bin/qmlscene"
"bin/qmltestrunner"
];
postFixup = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
mv $dev/bin/qmlformat $bin/bin/qmlformat
mv $dev/bin/qmltyperegistrar $bin/bin/qmltyperegistrar
ln -s $bin/bin/qmlformat $dev/bin/qmlformat
ln -s $bin/bin/qmltyperegistrar $dev/bin/qmltyperegistrar
'';
This conversation was marked as resolved.
Show resolved Hide resolved
}