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