mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
Move perSystem.checks into options
This commit is contained in:
parent
3149d748cb
commit
4835e05925
3 changed files with 17 additions and 13 deletions
2
lib.nix
2
lib.nix
|
@ -35,7 +35,7 @@ let
|
|||
shorthandOnlyDefinesConfig = false;
|
||||
});
|
||||
|
||||
mkPerSystemModule =
|
||||
mkPerSystemOption =
|
||||
module:
|
||||
mkOption {
|
||||
type = flake-modules-core-lib.mkPerSystemType module;
|
||||
|
|
|
@ -9,6 +9,7 @@ let
|
|||
;
|
||||
inherit (flake-modules-core-lib)
|
||||
mkSubmoduleOptions
|
||||
mkPerSystemOption
|
||||
;
|
||||
|
||||
programType = lib.types.coercedTo lib.types.package getExe lib.types.str;
|
||||
|
|
|
@ -9,6 +9,7 @@ let
|
|||
;
|
||||
inherit (flake-modules-core-lib)
|
||||
mkSubmoduleOptions
|
||||
mkPerSystemOption
|
||||
;
|
||||
in
|
||||
{
|
||||
|
@ -22,6 +23,20 @@ in
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
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 = {
|
||||
flake.checks =
|
||||
|
@ -37,17 +52,5 @@ in
|
|||
checks = flake.checks.${system};
|
||||
};
|
||||
|
||||
perSystem = system: { config, ... }: {
|
||||
_file = ./checks.nix;
|
||||
options = {
|
||||
checks = mkOption {
|
||||
type = types.lazyAttrsOf types.package;
|
||||
default = { };
|
||||
description = ''
|
||||
Derivations to be built by nix flake check.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue