-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
pkgsStatic: Finally obviate overlay! #134923
Conversation
++ lib.optional (!stdenv.hostPlatform.isDarwin) makeStaticBinaries | ||
|
||
# Glibc doesn’t come with static runtimes by default. | ||
# ++ lib.optional (stdenv.hostPlatform.libc == "glibc") ((lib.flip overrideInStdenv) [ self.stdenv.glibc.static ]) |
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.
Does this line have a future?
It has been unchanged since its introduction 3 years ago 3c36dcc but this move breaks the little context we have. This might be a good time to delete this commented code.
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.
fwiw makeStaticBinaries
already has some special casing for this (by adding glibc.static
to extraTargetLibraries
)
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.
I'll delete it after --- I think the context was always just the thing I moved it with.
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.
@sternenseemann since that one had the typo, neither is doing anything. Maybe we just would compile glibc properly now? Or maybe no one is testing without musl?
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.
I remember using makeStaticBinaries
and it working, but my suspicion is that in such cases using anything from pkgsStatic
will then leak musl in automatically, so in effect it may very well be that nobody is testing without musl.
Motivation for this change
I think overlay for just
stdenv
is overkill, and overlay for other packages causes issues when they need to be overridden multiple times hence why we've paired it down.This PR goes to Staging because it relies on other things that were mass rebuilds.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)