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
macOS closure-size reduction #39940
macOS closure-size reduction #39940
Conversation
This is a huge directory & not referenced anywhere.
adds 2 outputs for libSystem: - out - dev should shrink closure sizes
Success on x86_64-linux (full log) Attempted: gettext The following builds were skipped because they don't evaluate on x86_64-linux: darwin.ICU Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: darwin.ICU, gettext Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: gettext The following builds were skipped because they don't evaluate on aarch64-linux: darwin.ICU Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: darwin.ICU, gettext Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: gettext The following builds were skipped because they don't evaluate on x86_64-linux: darwin.ICU Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: gettext The following builds were skipped because they don't evaluate on aarch64-linux: darwin.ICU Partial log (click to expand)
|
@@ -3,10 +3,13 @@ | |||
removefile, libresolv, Libnotify, libplatform, libpthread, mDNSResponder, launchd, libutil, version }: | |||
|
|||
appleDerivation rec { | |||
phases = [ "unpackPhase" "installPhase" ]; |
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.
Maybe we should get rid of these in the other apple stuff, it can be pretty confusing when stuff like multiple outputs don't work if you don't think of this immediately.
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.
Yes! I think they can all be either removed or replaced with dontBuild = true
& dontConfigure = true
. I'm never sure whether they're actually needed though.
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.
Yeah, this was all clueless @copumpkin right at the beginning of his Nix career not knowing what he's doing. And yes, he occasionally speaks of himself in the third person.
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.
That's good to know! Occasionally it's necessary, for instance when a Makefile exists, but I'll just remove all of them & see what breaks.
Success on aarch64-linux (full log) Attempted: gettext, stdenv The following builds were skipped because they don't evaluate on aarch64-linux: darwin.ICU Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: gettext, stdenv The following builds were skipped because they don't evaluate on x86_64-linux: darwin.ICU Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: darwin.ICU, gettext, stdenv Partial log (click to expand)
|
e963d46
to
5206574
Compare
These are a couple of changes to reduce closure size. Based on the output of
nix-store -qR $(nix-build -A nix) | xargs du -sch | sort -h
:should reduce:
(also I wonder if aws-sdk-cpp should be disabled by default? it's huge & not necessary for regular Nix users)
Note - I don't have the time to build this right now. I think they are pretty straightforward changes though & hopefully ofborg will succeed.