-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
stdenvNoCC: drop extraBuildInputs
on Darwin
#392695
Conversation
Technically, this is a breaking change because something may depend on the presence of the SDK even without a compiler. I reviewers feel strongly about it, I can drop the backport. On the other hand, having the SDK in the dev shell creates a bad experience for users who expect |
Dropping the backport label at @emilazy’s recommendation since we’re half-way through the stable cycle, and this is a breaking change. Users who need a no-CC dev shell should either use unstable or use the following override on stable (24.11). mkShellNoCC = pkgs.mkShellNoCC.override {
stdenv = pkgs.stdenvNoCC.override { extraBuildInputs = [ ]; };
}; |
Darwin includes its SDK in `extraBuildInputs`, which isn’t needed in `stdenvNoCC` because it depends on a compiler. Including it greatly increases the size of the `stdenvNoCC` closure (by ~1 GiB). This wasn’t an issue in the past when darwin included CoreFoundation because CoreFoundation on its own is very small. Now that it includes the whole SDK and links some bintools, it pulls in 300~400 MiB for the SDK plus another ~445 MiB for LLVM. Fixes NixOS#371465
527167d
to
4928668
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idea LGTM and connects some dots surrounding mkShellNoCC and why I've had issues in the past. I cannot comment on backwards compatibility or breaking changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wish we didn’t have to put platform‐specific concerns here, but looks good.
Darwin includes its SDK in
extraBuildInputs
, which isn’t needed instdenvNoCC
because it depends on a compiler. Including it greatly increases the size of thestdenvNoCC
closure (by ~1 GiB).This wasn’t an issue in the past when darwin included CoreFoundation because CoreFoundation on its own is very small. Now that it includes the whole SDK and links some bintools, it pulls in 300~400 MiB for the SDK plus another ~445 MiB for LLVM.
Fixes #371465
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.