mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-12 10:14:31 +02:00
If the `ci` options are a set of options rather than a single option, then the module system cannot lazily override it via `mkForce`. In practice, this means that the dev partition gets evaluated strictly when the module system "pushes down" the `ci` definitions to its options. Instead, we must ensure that each attribute listed in `partitionedAttrs` corresponds to an actual option which can be directly defined, with no "pushing down" required. Fixes #3532
45 lines
983 B
Nix
45 lines
983 B
Nix
{ lib, config, ... }:
|
|
let
|
|
inherit (lib)
|
|
mapAttrs
|
|
types
|
|
;
|
|
in
|
|
{
|
|
perSystem = {
|
|
# per-system CI options
|
|
options.ci = {
|
|
buildbot = lib.mkOption {
|
|
type = types.lazyAttrsOf types.raw;
|
|
default = { };
|
|
description = ''
|
|
A set of tests for [buildbot] to run.
|
|
|
|
[buildbot]: https://buildbot.nix-community.org
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
flake = {
|
|
# top-level CI option
|
|
#
|
|
# NOTE:
|
|
# This must be an actual option, NOT a set of options.
|
|
# Otherwise, flake partitions will not be lazy.
|
|
options.ci = lib.mkOption {
|
|
type = types.lazyAttrsOf (types.lazyAttrsOf types.raw);
|
|
default = { };
|
|
description = ''
|
|
Outputs related to CI.
|
|
|
|
Usually defined via the `perSystem.ci` options.
|
|
'';
|
|
};
|
|
|
|
# Transpose per-system definitions to the top-level
|
|
config.ci = {
|
|
buildbot = mapAttrs (_: sysCfg: sysCfg.ci.buildbot) config.allSystems;
|
|
};
|
|
};
|
|
}
|