Constructor, that with the help of channels dependency constructs a
packagesFromOverlaysBuilder that outputs all packages defined
in overlays that do not break flake checks.
Good for sharing binary cached packages. Any package that would
break nix flake check (e.g. because it is marked as broken) cannot
be shared via this mechanism, and the alternative via overlays has to be
used.
overlaysFromChanelsExporter generates a flat namsepaced overlay
attribute set that exports every overlay key from every channel
individually.
Good for users that want to pull in individual overlays and evaluate
them with their own dependencies.
Rationale:
For internal coding purposes only the following attribute set does
not require an abstract name (such as `profile`). Moreover so, as
"profile" has a distinct legacy meaning in the nix ecosystem.
{
channelName = "...";
system = "...";
extraArgs = {};
modules = [];
};
Instead, this PR renames it to a banal and decribtive `hostAttrs`. This
naming does also better aling with the top level `defaultHostAttrs`.
defaultTo was an awkward syntax. The goal is to intuitively understand
the merging semantics. Unfortunetly, unlike haskell, nix does not
provide the necesary language features, so add a little sugar to it.
if both, defaultSystem and defaultHostAttrs.system are declared, which
should take precedence? And at any rate the other one becomes a no-op
api argument. Conditionally no-op api args are treacherous.
To avoid this sort of problems all args with an override semantic
need to be removed from top level. Currently this affects defaultSystem.
Note that since sharedModules and sharedExtraArgs have merge semantics,
they don't suffer this conflict, if both they are declared in both
places, at the very least non of them becomes a no-op.
This reverts commit faa7855068, reversing
changes made to 8a593ca296.
```
evalHostArgs =
{ channelName ? "nixpkgs"
, modules ? []
, system ? defaultSystem
, extraArgs ? {}
, ...
}: defaultHostAttrs
// {
inherit channelName system;
modules = sharedModules ++ modules;
extraArgs = sharedExtraArgs // extraArgs;
};
```
does not as intended.
- channelName would be "nixpkgs" even if a default is set.