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

Fix lima vz support by forcing Apple SDK 15 usage #354552

Closed
wants to merge 1 commit into from

Conversation

josvazg
Copy link
Contributor

@josvazg josvazg commented Nov 8, 2024

Help wanted: This does not work, but maybe the fix is easy?

Related to #346006

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

@josvazg josvazg changed the title Fix lima vz support by forcing apple SDK 15 usage Fix lima vz support by forcing Apple SDK 15 usage Nov 8, 2024
@emilazy
Copy link
Member

emilazy commented Nov 8, 2024

You want buildInputs , not nativeBuildInputs.

If the SDK version QEMU is built with matters, it should be changed in the QEMU package rather than overridden here.

@josvazg josvazg marked this pull request as draft November 8, 2024 20:16
@josvazg
Copy link
Contributor Author

josvazg commented Nov 8, 2024

You want buildInputs , not nativeBuildInputs.

If the SDK version QEMU is built with matters, it should be changed in the QEMU package rather than overridden here.

Thanks for the help and guidance? a few questions:

  • Why not nativeBuildInputs? I guess apple-sdk does not apply to non darwin platforms.

  • If qemu default build is stuck at apple_sdk 11 they might have a reason, right? Which means an override will fix this package that needs the newer SDK and to use vz rather than only have the option of qemu as a VM. On the other hand, if they are stuck with 11 it might mean that qemu nix package might not work without further effort on a newer SDK.

This can get into a deep rabbit hole.

@emilazy
Copy link
Member

emilazy commented Nov 8, 2024

  • Why not nativeBuildInputs? I guess apple-sdk does not apply to non darwin platforms.

nativeBuildInputs are for tools that run during the build. We want to override SDK for the host platform.

  • If qemu default build is stuck at apple_sdk 11 they might have a reason, right? Which means an override will fix this package that needs the newer SDK and to use vz rather than only have the option of qemu as a VM. On the other hand, if they are stuck with 11 it might mean that qemu nix package might not work without further effort on a newer SDK.

It’s actually using 12.3, and the reason is just that we had no newer SDKs available until recently. Though I wasn’t aware that QEMU could make use of any features that aren’t available on the 12.3 SDK? But I could be wrong.

@ofborg ofborg bot requested a review from voanhduy1512 November 8, 2024 22:17
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 8, 2024
@booxter
Copy link
Contributor

booxter commented Nov 13, 2024

FYI I bumped lima version and realized I need to also bump SDK to continue running ubuntu images with default templates, so something like this PR is also included in #355729

@josvazg
Copy link
Contributor Author

josvazg commented Nov 13, 2024

Thanks @booxter !

Closing as a (partial) duplicate of #355729

@josvazg josvazg closed this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 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.

3 participants