mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
checks: Use mkTransposedPerSystemModule
This commit is contained in:
parent
40b344843d
commit
5bcff37bc1
1 changed files with 10 additions and 33 deletions
|
@ -1,44 +1,21 @@
|
|||
{ config, lib, flake-parts-lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
filterAttrs
|
||||
mapAttrs
|
||||
mkOption
|
||||
optionalAttrs
|
||||
types
|
||||
;
|
||||
inherit (flake-parts-lib)
|
||||
mkSubmoduleOptions
|
||||
mkPerSystemOption
|
||||
mkTransposedPerSystemModule
|
||||
;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
flake = mkSubmoduleOptions {
|
||||
checks = mkOption {
|
||||
type = types.lazyAttrsOf (types.lazyAttrsOf types.package);
|
||||
default = { };
|
||||
description = ''
|
||||
Derivations to be built by nix flake check.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
perSystem = mkPerSystemOption ({ config, system, ... }: {
|
||||
_file = ./checks.nix;
|
||||
options = {
|
||||
checks = mkOption {
|
||||
type = types.lazyAttrsOf types.package;
|
||||
default = { };
|
||||
description = ''
|
||||
Derivations to be built by nix flake check.
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
};
|
||||
config = {
|
||||
transposition.checks = { };
|
||||
mkTransposedPerSystemModule {
|
||||
name = "checks";
|
||||
option = mkOption {
|
||||
type = types.lazyAttrsOf types.package;
|
||||
default = { };
|
||||
description = ''
|
||||
Derivations to be built by nix flake check.
|
||||
'';
|
||||
};
|
||||
file = ./checks.nix;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue