-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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 for 18.09 #51957
pkgsStatic for 18.09 #51957
Conversation
crossOverlays only apply to the packages being built, not the build packages. It is useful when you don’t care what is used to build your packages, just what is being built. The idea relies heavily on the cross compiling infrastructure. Using this implies that we need to create a cross stdenv. (cherry picked from commit a3a6ad7)
- makeStaticBinaries don’t work on Darwin (no stable ABI!) - Need to make sure NIX_CFLAGS_LINK appends - isStatic is not used anymore (cherry picked from commit 8726f6a)
The conditional was incorrect - postInstall script should only hsppen when enableShared = true. (cherry picked from commit 5e06294)
This is kind of a mess, but basically: - static=true, shared=true means to build statically but move it to the static output - static=true, shared=false means to build statically and leave it in the main output - static=false, shared=true means to not build static at all Confusingly, the old default was static=true, shared=true even though static=false? Still can’t figure out what was meant by that. (cherry picked from commit e999def)
when enableShared = false, we set --without-shared flag. (cherry picked from commit 53a6789)
Adds the static overlay that can be used to build Nixpkgs statically. Can be used like: nix build pkgsStatic.hello Not all packages build, as some rely on dynamic linking. (cherry picked from commit 6d90a8b)
This is missing a patch for portable libsystem |
@matthewbauer that was done after the original PR, right? I'm fine skipping it for the moment; I just need the Linux side on stable. |
Ah I think you mean #51881 or |
0b85745 Should be added. Otherwise darwin stuff is broken. |
Oh |
af2cebe is the cherry-pick. It's on master and |
Motivation for this change
A backport of #48803 for those wanting to use this but unable to switch from stable to master. A note is adding saying the interface is provisional. Presumably in 19.03 this will arrive on staging "the normal way" and the dust will have settled again.
Rebased on a recentish common ancestor of
master
andrelase-18.09
. This way any further fixes can be made on top of this (minus the top commit) and then easily merged into bothmaster
andrelease-19.09
. This is a lot easier than cherry-pick; with cherry-pick alone it wouldn't make sense to pre-release new interfaces on stable.N.B. I skipped b966d3c because that is a breaking interface change not appropriate for stable.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)CC @vaibhavsagar