zlib: Properly clean up static/shared distinction#66490
Conversation
|
@GrahamcOfBorg build zlib |
b6e2ad4 to
bd66819
Compare
|
The comments look good, but I'm a little bit surprised this needs to be a mass rebuild. I didn't think dontDisableStatic would be needed at all,
Changing the order seems reasonable though, at least to make things more clear. Not sure why it has that behavior, but my understanding was that zlib just always assumed you wanted static libraries. |
@matthewbauer Can you elaborate a bit on that? I thought that's passed in general, is there an exception for zlib somehwere that I could refer to?
I wasn't sure if there's anyone who wants the I didn't find many uses of it; what's the best way to find them all?
As far as I can tell, |
bd66819 to
5647474
Compare
Ah I see: nixpkgs/pkgs/stdenv/generic/setup.sh Lines 993 to 998 in 6490f9c This greps for
I've pushed a fix that should avoid mass rebuilds, with extra commentary for rationale. |
|
@GrahamcOfBorg eval @GrahamcOfBorg build zlib |
This improves what commit
e999def zlib: clean up static/shared distincion
described as "kind of a mess" and "confusing". And indeed it was confusing.
Now, the concept whether or not the .a file is moved to a split output
is controlled by a clean variable.
The defaults remain unchanged.
The new approach also finally cleanly allows building statically but NOT
using a split output, like all other autoconf-based projects in nixpkgs do
(using the `dontDisableStatic` setting).
That is important for overlays that want to enable static libs for all
packages in one go, without having to hand-patch idiosynchrasies like zlib
had until now.
Until now, if you wanted the .a in the main output, the only way was to go via
`static=false, shared=true` -- which made no sense, because you had to say
`static=false` even though you want a static lib. That is fixed now.
5647474 to
3d87db9
Compare
|
madler/zlib#394 may it someday be better upstream. |
I have filed a separate issue for this task at #66658. |
Our submodule now includes the fix from NixOS/nixpkgs#66490 which makes this unnecessary.
Our submodule now includes the fix from NixOS/nixpkgs#66490 which makes this unnecessary.
Our submodule now includes the fix from NixOS/nixpkgs#66490 which makes this unnecessary.
Our submodule now includes the fix from NixOS/nixpkgs#66490 which makes this unnecessary.
Our submodule now includes the fix from NixOS/nixpkgs#66490 which makes this unnecessary.
Includes #66486 (a simple comments change) which is for
master, while this is forstaging.Motivation for this change
The previous logic was "grown" and has become pretty crazy to understand.
This improves what commit e999def (zlib: clean up static/shared distincion) described as "kind of a mess" and "confusing". And indeed it was confusing.
Now, the concept whether or not the .a file is moved to a split output is controlled by a clean variable.
The defaults remain unchanged.
The new approach also finally cleanly allows building statically but NOT using a split output, like all other autoconf-based projects in nixpkgs do (using the
dontDisableStaticsetting).That is important for overlays that want to enable static libs for all packages in one go, without having to hand-patch idiosynchrasies like zlib had until now.
Until now, if you wanted the .a in the main output, the only way was to go via
static=false, shared=true-- which made no sense, because you had to saystatic=falseeven though you want a static lib. That is fixed now.Things done
sandboxinnix.confon non-NixOS)nix-shell -p nix-review --run "nix-review wip"./result/bin/)nix path-info -Sbefore and after)shared,staticandsplitStaticOutput, checking that the files in the outputs are as expected.Notify maintainers
cc @matthewbauer