qt5.qtbase: ignore hook propagated from buildPlatform#264964
Conversation
Artturin
reviewed
Nov 3, 2023
13 tasks
Author
|
Author
|
Rebased, maybe this time LLVM won't time out. |
13 tasks
broken by "qt5.wrapQtAppsHook: move libs to depsTargetTargetPropagated" qtbase propagates a lot of stuff frescobaldi> msgcat -o - frescobaldi/cs.po userguide/cs.po | msgfmt -o ../frescobaldi_app/i18n/cs.mo - frescobaldi> sh: line 1: msgcat: command not found frescobaldi> sh: line 1: msgfmt: command not found
…denvs The main headache with cross-compiling QT is that our QT derivations go bananas with propagatedInputs. Unfortunately this means that both buildPackages.qtbase and hostPackages.qtbase get propagated into the dependencies of every cross-compiled builds, which triggers the hook check. Previously in #227900 I simply disabled the check outright for cross-compiled builds. This is a more refined solution, where we skip the hook if it propagates across a platform change.
13 tasks
Artturin
reviewed
Nov 25, 2023
| name = "wrap-qt5-apps-hook"; | ||
| propagatedBuildInputs = [ qtbase.dev makeBinaryWrapper ] | ||
| propagatedBuildInputs = [ makeBinaryWrapper ]; | ||
| depsTargetTargetPropagated = [ qtbase.dev ] |
Artturin
reviewed
Nov 25, 2023
| dontStrip = debugSymbols; | ||
|
|
||
| setupHook = ../hooks/qtbase-setup-hook.sh; | ||
| env.qtbase_stdenv = stdenv.outPath; |
Member
There was a problem hiding this comment.
This overrides env, has to be moved to the env block
qtbase-aarch64-unknown-linux-gnu> qxcbcursor.cpp: In constructor 'QXcbCursor::QXcbCursor(QXcbConnection*, QXcbScreen*)':
qtbase-aarch64-unknown-linux-gnu> qxcbcursor.cpp:320:43: error: 'NIXPKGS_LIBXCURSOR' was not declared in this scope
qtbase-aarch64-unknown-linux-gnu> 320 | QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1);
qtbase-aarch64-unknown-linux-gnu> | ^~~~~~~~~~~~~~~~~~
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Includes
Description of changes
The main headache with cross-compiling QT is that our QT derivations go bananas with
propagatedInputs. Unfortunately this means that bothbuildPackages.qtbaseandpkgs.qtbaseget propagated into the dependencies of every cross-compiled build, which triggers the hook check:nixpkgs/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh
Lines 1 to 9 in feaa219
Previously in #227900 I simply disabled the check outright for cross-compiled builds. This is a more refined solution, where we skip the hook if has a different
stdenv.outPaththan the derivation being built.This works because the outpath of
stdenvis written into the environment of every derivation. There's nothing else we can use that's guaranteed to be in every derivation thatqtbase-setup-hook.shis propagated into.We should stop using
propagatedBuildInputs.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)