treewide: Start to break up static overlay
We can use use `stdenv.hostPlatform.isStatic` instead, and move the logic per package. The least opionated benefit of this is that it makes it much easier to replace packages with modified ones, as there is no longer any issue of overlay order. CC @FRidh @matthewbauer
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
# Note: If `{ static = false; shared = false; }`, upstream's default is used
|
||||
# (which is building both static and shared as of zlib 1.2.11).
|
||||
, shared ? true
|
||||
, shared ? !stdenv.hostPlatform.isStatic
|
||||
, static ? true
|
||||
# If true, a separate .static ouput is created and the .a is moved there.
|
||||
# In this case `pkg-config` auto detection does not currently work if the
|
||||
# .static output is given as `buildInputs` to another package (#66461), because
|
||||
# the `.pc` file lists only the main output's lib dir.
|
||||
# If false, and if `{ static = true; }`, the .a stays in the main output.
|
||||
, splitStaticOutput ? static
|
||||
, splitStaticOutput ? shared && static
|
||||
}:
|
||||
|
||||
# Without either the build will actually still succeed because the build
|
||||
# system makes an arbitrary choice, but we shouldn't be so indecisive.
|
||||
assert shared || static;
|
||||
|
||||
# Note: this package is used for bootstrapping fetchurl, and thus
|
||||
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
||||
# cgit) that are needed here should be included directly in Nixpkgs as
|
||||
|
||||
Reference in New Issue
Block a user