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.devShells into options

This commit is contained in:
Robert Hensing 2022-05-17 10:09:53 +02:00
parent ef93e89462
commit a329428f20

View file

@ -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 .#&lt;name></literal>.
<literal>nix build .#&lt;name></literal> will run <literal>devShells.&lt;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 .#&lt;name></literal>.
<literal>nix build .#&lt;name></literal> will run <literal>devShells.&lt;name></literal>.
'';
};
};
};
};
}