This is an implementation detail leaking out into the bash environment
and it did manange to confuse me as potentially being a way to get the "default"
output name when structuredAttrs is enabled, because of the "outputName" derivation attribute.
Convert 3 optionalAttrs in the stdenv derivation call to nullable
attribute names: allowedRequisites, contentAddressedByDefault, and
isDarwin sandbox/impureHostDeps.
The comment claimed configureFlags is "sometimes a string, sometimes
null, and sometimes a list" — the normalization it referenced was
removed long ago; configureFlags is always a list now.
We can safely check `elem "all" hardeningDisable'` on the original list,
because calling `unique` and `concretizeFlagImplications` will never
change whether the list contains "all".
We define a meta variable in the same let block as the result of
the `commonMeta` call. Avoiding evaluating the result of that call
until we need to is preferable.
As suggested in PR review:
"It seems like when `!stdenvHasCC`, `stdenv.cc` is `null`. So this could
probably just be `defaultHardeningFlags =
stdenv.cc.defaultHardeningFlags or knownHardeningFlags;`?"
This is not the actual version we want to hardcode here, but due to the upcomming branch-of we need this version to not beaffected by the release version, but it also needs to stay exatly the same as we do not want to rebuild `stdenv` anymore post branch-of.
This fixes the problem where if `meta` for package A is inherited from
package B, both team and non-team maintainers would end up in
nonTeamMaintainers, because by default it would take the value from
meta.maintainers, which when accessed also contains team maintainers
for backwards compatibility reasons.
Rather than precomputing what the stdenv host suffix should be, we check
the condition first. This is even better than turning the concats into
multiple comparisons (although I'm going to do that as well), since if
hostPlatform == buildPlatform, we never have to evaluate any further.