1
0
Fork 0
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:
Robert Hensing 2022-05-13 10:15:21 +02:00
parent 3149d748cb
commit 4835e05925
3 changed files with 17 additions and 13 deletions

View file

@ -35,7 +35,7 @@ let
shorthandOnlyDefinesConfig = false; shorthandOnlyDefinesConfig = false;
}); });
mkPerSystemModule = mkPerSystemOption =
module: module:
mkOption { mkOption {
type = flake-modules-core-lib.mkPerSystemType module; type = flake-modules-core-lib.mkPerSystemType module;

View file

@ -9,6 +9,7 @@ let
; ;
inherit (flake-modules-core-lib) inherit (flake-modules-core-lib)
mkSubmoduleOptions mkSubmoduleOptions
mkPerSystemOption
; ;
programType = lib.types.coercedTo lib.types.package getExe lib.types.str; programType = lib.types.coercedTo lib.types.package getExe lib.types.str;

View file

@ -9,6 +9,7 @@ let
; ;
inherit (flake-modules-core-lib) inherit (flake-modules-core-lib)
mkSubmoduleOptions mkSubmoduleOptions
mkPerSystemOption
; ;
in 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 = { config = {
flake.checks = flake.checks =
@ -37,17 +52,5 @@ in
checks = flake.checks.${system}; 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.
'';
};
};
};
}; };
} }