1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-03-15 21:08:26 +00:00
flake-parts/modules/devShells.nix

46 lines
1.1 KiB
Nix
Raw Normal View History

2022-05-25 16:36:33 +02:00
{ config, lib, flake-parts-lib, ... }:
let
inherit (lib)
filterAttrs
mapAttrs
mkOption
optionalAttrs
types
;
2022-05-25 16:36:33 +02:00
inherit (flake-parts-lib)
mkSubmoduleOptions
2022-05-17 10:09:53 +02:00
mkPerSystemOption
;
in
{
options = {
flake = mkSubmoduleOptions {
devShells = mkOption {
type = types.lazyAttrsOf (types.lazyAttrsOf types.package);
default = { };
description = ''
Per system an attribute set of packages used as shells.
<literal>nix develop .#&lt;name></literal> will run <literal>devShells.&lt;system>.&lt;name></literal>.
'';
};
};
2022-05-17 10:09:53 +02:00
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 = {
2022-10-26 13:16:04 +02:00
transposition.devShells = { };
};
}