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

pkgsStatic: Finally obviate overlay! #134923

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

Ericson2314
Copy link
Member

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
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.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.

@Ericson2314 Ericson2314 requested a review from nbp as a code owner August 20, 2021 06:17
@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Aug 20, 2021
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Aug 20, 2021
++ 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 ])
Copy link
Member

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.

Copy link
Member

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)

Copy link
Member Author

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.

Copy link
Member Author

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?

Copy link
Member

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.

@Ericson2314 Ericson2314 merged commit 6643acc into NixOS:staging Aug 20, 2021
@Ericson2314 Ericson2314 deleted the no-static-overlay branch August 20, 2021 16:44
@vcunat vcunat mentioned this pull request Sep 7, 2021
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: stdenv Standard environment 10.rebuild-darwin: 1-10 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