Skip to content

Conversation

@FliegendeWurst
Copy link
Member

By default $cmakeFlags is empty, if cross-compiling it isn't. This ensures the build fails loudly even if meta.broken is ignored.

Not tested: whether enabling rocm or cuda would add undesired flags to $cmakeFlags.

Things done

  • Built on platform(s)
    • x86_64-linux (acceleration = null, $cmakeFlags empty, so no change)
    • 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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

By default $cmakeFlags is empty, if cross-compiling it isn't.
This ensures the build fails loudly even if meta.broken is ignored.
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Apr 18, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Apr 18, 2025
@Aleksanaa
Copy link
Member

By default $cmakeFlags is empty, if cross-compiling it isn't. This ensures the build fails loudly even if meta.broken is ignored.

What are you trying to achieve with that? Are there any hidden problems with the output of cross compilation at present?

@FliegendeWurst
Copy link
Member Author

Yes, it does CPU feature detection using the builder CPU. And $cmakeFlags are required to successfully cross-compile at all, I think.
(At present it does not cross compile to e.g. aarch64: log.)

@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 18, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". label Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants