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: cross compile with a clean separation of build and host binaries #267311

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Commits on May 28, 2024

  1. distccMasquerade: add ar

    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    6d53085 View commit details
    Browse the repository at this point in the history
  2. Revert "nixos/no-x-libs: build qtbase without qt translation"

    Not sure what was the problem here, but as of next commit
    qtbase successfully builds with `environment.noXlibs = true`
    and qttranslations.
    
    This reverts commit 2e14d8b.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    964550b View commit details
    Browse the repository at this point in the history
  3. qt5: rework bootstrapping

    Add to qtbase support for building a small bootstrap package.
    
    Move qmake and other tools from qtbase.dev to qtbase.qmake
    to avoid pulling in a second version of qtbase.dev in cross builds.
    
    Use hidden bootstrap packages for qtbase and qttools instead of
    overrideScope-based staging process to solve some spurious builds
    and infinite recursions.
    
    This commit by itself will allow to cross compile only qttranslations
    and qtbase.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    d81dd55 View commit details
    Browse the repository at this point in the history
  4. qt5.qtbase: always build all packaged binaries for the hostPlatform

    Also teach the setup hook, qmake and cmake scripts to search various
    build tools in PATH and use them for cross compilation.
    
    This will allow to cross compile packages that require only qtbase and
    qmake.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    f7a5576 View commit details
    Browse the repository at this point in the history
  5. qt5.qtbase: support substituting a cross-built qtbase dependency with…

    … a native-built one
    
    For this we need to dynamically detect cross compilation in qtbase-setup-hook.sh
    and in mkspecs, and stop unconditionally using binary lndir in propagatedNativeBuildInputs.
    
    For now qtbase substitution will work only in one (most used) direction, and in many cases
    will additionally require to manually add a buildHost version of qtbase.qmake to
    nativeBuildInputs of the package that depends on qtbase.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    3d23b67 View commit details
    Browse the repository at this point in the history
  6. qt5.full: add disallowedReferences for qmake from buildHost

    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    e26f0de View commit details
    Browse the repository at this point in the history
  7. qt5: fix discovery of QT modules in cross builds

    Without it qtwebchannel will fail to find some library includes,
    qtquickcontrols will refuse to build without properly failing the
    build:
    ```
    Some of the required modules (qtHaveModule(quick)) are not available.
    Skipped.
    ```
    And there are probably more problems, not always obvious.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    85a7eed View commit details
    Browse the repository at this point in the history
  8. qt5.qtwayland: fix cross compilation and dependencies

    It needs only qtdeclarative to build, not qtquickcontrols.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    3a0a27b View commit details
    Browse the repository at this point in the history
  9. qt5.qtdeclarative: fix cross for qtdeclarative and some of it's users

    If you're a nativeBuildInput somewhere, you probably shouldn't propagate
    qtbase.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    bef05f6 View commit details
    Browse the repository at this point in the history
  10. qt5.qttools: fix detection of lrelease and other tools in cross build…

    …s with qttools as a buildInput
    
    And don't propagate qtbase to avoid pulling in a second qtbase.dev in
    cross builds.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    d37157c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e3eaf7e View commit details
    Browse the repository at this point in the history
  12. qt5.qtwebkit: use hyphen from pkgs

    The sources in tarbals are identical, and hyphen from pkgs properly supports cross compilation.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    041620b View commit details
    Browse the repository at this point in the history
  13. qt5.qtwebkit: add missing optional deps

    It will use the bundled woff2 lib if we don't provide a system one.
    And "DWARF optimization and duplicate removal tool" is just nice to
    have, I guess.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    f3ae8f6 View commit details
    Browse the repository at this point in the history
  14. Revert "qt5.qtwebchannel: omit "bin" output when cross compiling"

    Not sure why it was done.
    
    This reverts commit 49e8d9d.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    7b40a46 View commit details
    Browse the repository at this point in the history
  15. pyqt5: update cross

    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    0f6bb01 View commit details
    Browse the repository at this point in the history
  16. qt5.qtwebengine: update cross compilation support

    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    2c2d838 View commit details
    Browse the repository at this point in the history
  17. pyqtwebengine: update cross compilation support

    I expect here that qtwebengine will propagate qtwebchannel and qtdeclarative and that
    qtdeclarative will propagate itself as a nativeBuildInput. But maybe we
    shouldn't rely on those propagations?
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    772fd80 View commit details
    Browse the repository at this point in the history
  18. qt5.qtbase: add preliminary support for cross on Darwin

    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    5d64c29 View commit details
    Browse the repository at this point in the history
  19. qt5.full: simplify package functions' definitions and calls

    Rely on callPackage whenever possible. And pass a spliced version of
    stdenv to fix cross compilaton for qtwebengine.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    0199c73 View commit details
    Browse the repository at this point in the history
  20. qt5.qtbase: remove broken QMAKEMODULES code

    It never worked and it's just an attempt to duplicate the logic
    from qmake (i.e. QMAKEPATH -> QMAKEMODULES translation) that qmake
    does all by itself.
    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    dbabeed View commit details
    Browse the repository at this point in the history
  21. qt5.qtbase: fix mysql support for cross builds

    eryngion authored and Artturin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    27353f1 View commit details
    Browse the repository at this point in the history