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

qutebrowser: enable cross compilation #230171

Closed
wants to merge 25 commits into from
Closed

qutebrowser: enable cross compilation #230171

wants to merge 25 commits into from

Commits on May 5, 2023

  1. qt5: use makeScopeWithSplicing

    if there is more than one qt5 attr and this file is copied then the arg
    to generateSplicesForMkScope should be changed
    Artturin authored and Adam Joseph committed May 5, 2023
    Configuration menu
    Copy the full SHA
    9fa4c9a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ad4c604 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    413bf08 View commit details
    Browse the repository at this point in the history
  4. qt5: use depsTargetTargetPropagated for self.qtbase.dev

    Without this, two different copies of qtbase to wind up in the
    buildInputs for cross compiled builds, leading to this sort of
    breakage for PyQt:
    
    ```
    Error: detected mismatched Qt dependencies:
         /nix/store/8g7xc01pj6y569qfyf5ccfbs5dr87wwq-qtbase-aarch64-unknown-linux-gnu-5.15.9-dev
         /nix/store/w19n5gzlx4fv63a3dn5965s661nhakv9-qtbase-5.15.9-dev
    ```
    Adam Joseph committed May 5, 2023
    Configuration menu
    Copy the full SHA
    fed6ec7 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2023

  1. qt5: add buildPackages.stdenv.cc to depsBuildBuild

    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    ae5f76c View commit details
    Browse the repository at this point in the history
  2. qt5.qtbase: add configureFlags for cross

    This commit adds the `-device` and `-device-option` flags necessary
    for cross compilation to `configureFlags`.
    
    It also adds the (one-entry at the moment) Rosetta Stone for QT-5 as
    a `let`-defined `qtPlatform` function which takes a nixpkgs platform
    and returns a QT-5 `mkspecs`-string.
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    4d80a33 View commit details
    Browse the repository at this point in the history
  3. qt5.qtbase: add configurePhase env vars for cross

    This commit:
    
    - sets the `PKG_CONFIG_SYSROOT_DIR` and `PKG_CONFIG_LIBDIR`
      environment variables when compiling a cross-targeted `qmake`.
      This is required; if these environment variables are unset,
      `qmake` won't even try to use `pkg-config`.
    
    - writes `LDFLAGS`, `CFLAGS`, and `CXXFLAGS` into `qmake.conf`.
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    2c34157 View commit details
    Browse the repository at this point in the history
  4. qt5.qtbase: omit --host and --build configureFlags

    QT's configure script doesn't understand these, so let's not pass them.
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    5293dad View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d7e0a4f View commit details
    Browse the repository at this point in the history
  6. qt5.qtdeclarative: populate $dev/bin when cross

    Later stages of the build process expect to find
    
      $bin/bin/{qmlformat,qmltyperegistrar}
    
    however qt's quirky build tooling doesn't feel like it's in the mood
    to put those files there when doing a cross-compiled build.  Instead
    it puts them in $dev/bin.  Let's move them to the right place and
    add symlinks from whence we moved them (the symlinks can't point the
    other way due to reference cycles).
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    c15dfef View commit details
    Browse the repository at this point in the history
  7. qt5.qtwayland: fix cross compilation

    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    3269871 View commit details
    Browse the repository at this point in the history
  8. qt5.qtwebchannel: omit $bin output if cross

    QtWebChannel does not produce binaries when it is cross-compiled.
    Let's omit the `$bin` output in that case.
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    59ea980 View commit details
    Browse the repository at this point in the history
  9. qt5.qtwebengine: use python3 (to fix cross)

    The expression in its current form attempts to invoke the python2
    interpreter for the wrong (i.e. build) architecture.
    
    Using python3 explicitly, rather than relying on aliases, fixes this.
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    42ce406 View commit details
    Browse the repository at this point in the history
  10. qt5.qtwebengine: point build at proper pkg-config for cross

    When cross-compiling, qmake insists on being able to find a
    `pkgsHostForTarget`-style `pkg-config` with the name `pkg-config`
    (no target prefix allowed).
    
    To keep `qmake` happy, this commit creates a one-symlink derivation
    containing a link `pkg-config` which points to
    `${targetPrefix}pkg-config`.
    
    This commit also sets the `PKG_CONFIG` environment variable.
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    c8a11f9 View commit details
    Browse the repository at this point in the history
  11. qt5.qtwebengine: fix cross

    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    bc87e5f View commit details
    Browse the repository at this point in the history
  12. pythonPackages.pynacl: fix cross

    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    5c34adf View commit details
    Browse the repository at this point in the history
  13. adblock: mark broken if cross

    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    9ac67a3 View commit details
    Browse the repository at this point in the history
  14. pykeepass: mark broken if cross

    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    40c552b View commit details
    Browse the repository at this point in the history
  15. pyqt5: add enableVerbose?false

    The build logs from PyQT5 are quite verbose; it's nice to trim them
    down so all you see is the errors.  This commit adds an option which
    does that.
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    764414a View commit details
    Browse the repository at this point in the history
  16. pyqt: fix cross compilation

    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    9fb7ad3 View commit details
    Browse the repository at this point in the history
  17. pyqtwebengine: use multiple cores, dont discard errors

    This commit causes pyqtwebengine to build using -j$NIX_BUILD_CORES,
    and also adds the verbose flag which really means "don't send build
    errors to /dev/null".
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    30e6396 View commit details
    Browse the repository at this point in the history
  18. pyqtwebengine: fix cross

    This commit:
    
    - adds qtwebchannel to deps
    - takes sip from buildPackages
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    2df05d9 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    a7f9220 View commit details
    Browse the repository at this point in the history
  20. qutebrowser: enable cross compilation

    This commit successfully cross compiles qutebrowser and all its
    dependencies (pyqt, qt-5, wayland, etc).
    Adam Joseph committed May 6, 2023
    Configuration menu
    Copy the full SHA
    aee65e3 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2023

  1. qtwebengine: pipewireSupport=false if cross

    Adam Joseph committed May 7, 2023
    Configuration menu
    Copy the full SHA
    0cc380b View commit details
    Browse the repository at this point in the history