1
0
Fork 0
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:
Shea Levy 2022-10-30 06:58:53 -04:00
parent 40b344843d
commit 5bcff37bc1
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27

View file

@ -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;
}