Skip to content

Comments

libsForQt5: use makeScopeWithSplicing#266537

Merged
2 commits merged intoNixOS:masterfrom
Artturin:qt5splicefixes
Nov 11, 2023
Merged

libsForQt5: use makeScopeWithSplicing#266537
2 commits merged intoNixOS:masterfrom
Artturin:qt5splicefixes

Conversation

@Artturin
Copy link
Member

@Artturin Artturin commented Nov 9, 2023

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Fixes getting spliced packages with `libsForQt5.callPackage`
Remove attributes which are coming from the sets which are added `//`,
they weren't working correctly.

Same thing is done in `llvmPackages`
@Artturin Artturin added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Nov 9, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 9, 2023
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Yep, everything builds for me with this.

Looking forward to all the helpful lib.warns we will be able to add in two weeks.

@ghost ghost merged commit 84b8b95 into NixOS:master Nov 11, 2023
@ghost
Copy link

ghost commented Nov 13, 2023

Ugh, unfortunately my workaround for the fact that pythonPackages isn't spliced no longer works with this. So I don't know how to make pyqt5 cross-compile anymore.

@Artturin
Copy link
Member Author

python3Packages is spliced.

@ghost
Copy link

ghost commented Nov 13, 2023

Here, paste this. The first derivation builds (proof from ofborg); the second one won't.

It gets all confused and tries to use buildPackages.qmake which tries to run g++ (no aarch64-unknown-linux- prefix).

# [DONTMERGE] PR to demonstrate qutebrowser cross compile #265401
git fetch https://github.com/NixOS/nixpkgs/ pull/265401/head
git reset --hard FETCH_HEAD

# built successfully by ofborg: https://github.com/NixOS/nixpkgs/pull/265401/checks?check_run_id=18368468301
nix-instantiate . -A pkgsCross.aarch64-multiplatform.python3Packages.pyqt5
# /nix/store/8sf71dnxw3hd04ga6k2vdd3wypgkz24l-python3.11-PyQt5-5.15.9-aarch64-unknown-linux-gnu.drv

# cherry-pick this PR
git cherry-pick 84b8b952085f71c1d3184e99b85806417fbc850f^
git cherry-pick 84b8b952085f71c1d3184e99b85806417fbc850f

nix-instantiate . -A pkgsCross.aarch64-multiplatform.python3Packages.pyqt5
# /nix/store/i4p7k5ika43j615cliq01ggla7dcn2pq-python3.11-PyQt5-5.15.9-aarch64-unknown-linux-gnu.drv

nix-diff \
  /nix/store/i4p7k5ika43j615cliq01ggla7dcn2pq-python3.11-PyQt5-5.15.9-aarch64-unknown-linux-gnu.drv \
  /nix/store/8sf71dnxw3hd04ga6k2vdd3wypgkz24l-python3.11-PyQt5-5.15.9-aarch64-unknown-linux-gnu.drv

The nix-diff output (green is #265401, red is #265401 plus the two commits from this PR) shows that this PR is somehow influencing which stdenv is used by qmake, which is totally bizzarre. Ugh, our python situation is such a tangled mess. Nothing else was affected; just the Python stuff that uses qt5.

screenshot-20231113-050447


let
pkgs = __splicedPackages;
qt5 = __splicedPackages.qt5;
Copy link
Member Author

Choose a reason for hiding this comment

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

@amjoseph-nixpkgs
this is the issue

nix-repl> pkgsCross.aarch64-multiplatform.pkgsBuildTarget.targetPackages.libsForQt5.qtbase ? __spliced
true

Fixing it..

Copy link
Member Author

Choose a reason for hiding this comment

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

@Artturin Artturin deleted the qt5splicefixes branch July 23, 2025 15:12
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant