mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2025-03-16 21:38:24 +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)
|
inherit (flake-modules-core-lib)
|
||||||
mkSubmoduleOptions
|
mkSubmoduleOptions
|
||||||
|
mkPerSystemOption
|
||||||
;
|
;
|
||||||
in
|
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 = {
|
config = {
|
||||||
flake.packages =
|
flake.packages =
|
||||||
|
@ -38,18 +53,5 @@ in
|
||||||
packages = flake.packages.${system};
|
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…
Add table
Reference in a new issue