mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-03 09:36:10 +02:00
flake/ci: add ci.buildbot
output
Adds top-level and per-system `ci.buildbot` option for defining tests to
build on buildbot.
These are exposed as the `ci.buildbot.«system»` flake output.
(cherry picked from commit e18d3fb280
)
This commit is contained in:
parent
82fafc9f9f
commit
2a7854903c
3 changed files with 46 additions and 0 deletions
43
flake/ci.nix
Normal file
43
flake/ci.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mapAttrs
|
||||
types
|
||||
;
|
||||
|
||||
buildbotOpt = lib.mkOption {
|
||||
type = types.lazyAttrsOf types.package;
|
||||
default = { };
|
||||
description = ''
|
||||
A set of tests for [buildbot] to run.
|
||||
|
||||
[buildbot]: https://buildbot.nix-community.org
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
perSystem = {
|
||||
# Declare per-system CI options
|
||||
options.ci = {
|
||||
buildbot = buildbotOpt;
|
||||
};
|
||||
};
|
||||
|
||||
flake = {
|
||||
# Declare top-level CI options
|
||||
options.ci = {
|
||||
buildbot = lib.mkOption {
|
||||
type = types.lazyAttrsOf buildbotOpt.type;
|
||||
default = { };
|
||||
description = ''
|
||||
See `perSystem.ci.buildbot` for description and examples.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Transpose per-system CI outputs to the top-level
|
||||
config.ci = {
|
||||
buildbot = mapAttrs (_: sysCfg: sysCfg.ci.buildbot) config.allSystems;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue