mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2025-03-31 04:04:55 +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, ... }:
|
{ config, lib, flake-parts-lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
filterAttrs
|
|
||||||
mapAttrs
|
|
||||||
mkOption
|
mkOption
|
||||||
optionalAttrs
|
|
||||||
types
|
types
|
||||||
;
|
;
|
||||||
inherit (flake-parts-lib)
|
inherit (flake-parts-lib)
|
||||||
mkSubmoduleOptions
|
mkTransposedPerSystemModule
|
||||||
mkPerSystemOption
|
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
{
|
mkTransposedPerSystemModule {
|
||||||
options = {
|
name = "checks";
|
||||||
flake = mkSubmoduleOptions {
|
option = mkOption {
|
||||||
checks = mkOption {
|
type = types.lazyAttrsOf types.package;
|
||||||
type = types.lazyAttrsOf (types.lazyAttrsOf types.package);
|
default = { };
|
||||||
default = { };
|
description = ''
|
||||||
description = ''
|
Derivations to be built by nix flake check.
|
||||||
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 = { };
|
|
||||||
};
|
};
|
||||||
|
file = ./checks.nix;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue