mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
Move perSystem.packages into options
This commit is contained in:
parent
fdd87732fd
commit
1c0f8f3036
1 changed files with 15 additions and 13 deletions
|
@ -9,6 +9,7 @@ let
|
|||
;
|
||||
inherit (flake-modules-core-lib)
|
||||
mkSubmoduleOptions
|
||||
mkPerSystemOption
|
||||
;
|
||||
in
|
||||
{
|
||||
|
@ -23,6 +24,20 @@ in
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
perSystem = mkPerSystemOption ({ config, ... }: {
|
||||
_file = ./packages.nix;
|
||||
options = {
|
||||
packages = mkOption {
|
||||
type = types.lazyAttrsOf types.package;
|
||||
default = { };
|
||||
description = ''
|
||||
An attribute set of packages to be built by <literal>nix build .#<name></literal>.
|
||||
<literal>nix build .#<name></literal> will build <literal>packages.<name></literal>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
config = {
|
||||
flake.packages =
|
||||
|
@ -38,18 +53,5 @@ in
|
|||
packages = flake.packages.${system};
|
||||
};
|
||||
|
||||
perSystem = system: { config, ... }: {
|
||||
_file = ./packages.nix;
|
||||
options = {
|
||||
packages = mkOption {
|
||||
type = types.lazyAttrsOf types.package;
|
||||
default = { };
|
||||
description = ''
|
||||
An attribute set of packages to be built by <literal>nix build .#<name></literal>.
|
||||
<literal>nix build .#<name></literal> will build <literal>packages.<name></literal>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue