packages/lib: devshell tools
This commit is contained in:
parent
2c897db439
commit
4e9296656e
1 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,8 @@ let
|
|||
|
||||
wrapInAttrs = value: if builtins.isAttrs value then value else { inherit value; };
|
||||
|
||||
wrapPackage = package: { inherit package; };
|
||||
|
||||
injectAttrName = name: value: { inherit name; } // wrapInAttrs value;
|
||||
|
||||
mkNamedAttrs = builtins.mapAttrs injectAttrName;
|
||||
|
@ -14,6 +16,7 @@ let
|
|||
in
|
||||
{
|
||||
packages ? [],
|
||||
tools ? [],
|
||||
commands ? {},
|
||||
env ? {},
|
||||
config ? {}
|
||||
|
@ -21,6 +24,9 @@ in
|
|||
mkShell {
|
||||
imports = [
|
||||
config
|
||||
{
|
||||
commands = map wrapPackage tools;
|
||||
}
|
||||
{
|
||||
inherit packages;
|
||||
commands = attrsToNamedList commands;
|
||||
|
|
Loading…
Reference in a new issue