Skip to content

fix(packaging): restrict nix-nswrapper to Linux platforms#15248

Merged
1 commit merged intoNixOS:masterfrom
roberth:nswrapper-darwin
Feb 25, 2026
Merged

fix(packaging): restrict nix-nswrapper to Linux platforms#15248
1 commit merged intoNixOS:masterfrom
roberth:nswrapper-darwin

Conversation

@roberth
Copy link
Member

@roberth roberth commented Feb 16, 2026

It is only supported on that host platform.
This adds a bunch of redundant-ish wiring logic, because the alternative
is accessing meta.platforms generically, but that would cause these
flake output attrsets containing the packages to be strict in all
packages
, which is very bad for performance and robustness.

Checked:

  • Cross-compilation still works for Linux targets (arm, riscv),
    even when build platform is Darwin
  • No attributes for nix-nswrapper for native Darwin

It is only supported on that host platform.
This adds a bunch of redundant-ish wiring logic, because the alternative
is accessing `meta.platforms` generically, but that would cause these
flake output attrsets *containing* the packages to be *strict in all
packages*, which is very bad for performance and robustness.

Checked:
- Cross-compilation still works for Linux targets (arm, riscv),
  even when build platform is Darwin
- No attributes for nix-nswrapper for native Darwin
@roberth roberth requested a review from edolstra as a code owner February 16, 2026 16:26
@xokdvium
Copy link
Contributor

Not a fan of how this complicates things even further than they are. I wonder if there's a way to simplify this stuff. Probably not a lot of reason to keep this stuff in a separate component - might as well be an executable in the nix-cli component tbh.

@Ericson2314
Copy link
Member

If it was an executable in the nix-cli component, that would give it a bunch of unnecessary nix-level dependencies, fwiw. We want to be use it is only linking libutil, because otherwise we'll run into those multithreading problems again.

@xokdvium
Copy link
Contributor

We want to be use it is only linking libutil, because otherwise we'll run into those multithreading problems again.

Have a separate executable in that component?

@roberth
Copy link
Member Author

roberth commented Feb 16, 2026

Maybe the overhead of evaluating all components' meta.stuff isn't horrible. If so, you'd only degrade robustness a little.
Anyway, this is the low-risk way of fixing this and master is currently broken.

@roberth roberth mentioned this pull request Feb 17, 2026
@github-merge-queue github-merge-queue bot closed this pull request by merging all changes into NixOS:master in 76eca8f Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants