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; };
|
wrapInAttrs = value: if builtins.isAttrs value then value else { inherit value; };
|
||||||
|
|
||||||
|
wrapPackage = package: { inherit package; };
|
||||||
|
|
||||||
injectAttrName = name: value: { inherit name; } // wrapInAttrs value;
|
injectAttrName = name: value: { inherit name; } // wrapInAttrs value;
|
||||||
|
|
||||||
mkNamedAttrs = builtins.mapAttrs injectAttrName;
|
mkNamedAttrs = builtins.mapAttrs injectAttrName;
|
||||||
|
@ -14,6 +16,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages ? [],
|
packages ? [],
|
||||||
|
tools ? [],
|
||||||
commands ? {},
|
commands ? {},
|
||||||
env ? {},
|
env ? {},
|
||||||
config ? {}
|
config ? {}
|
||||||
|
@ -21,6 +24,9 @@ in
|
||||||
mkShell {
|
mkShell {
|
||||||
imports = [
|
imports = [
|
||||||
config
|
config
|
||||||
|
{
|
||||||
|
commands = map wrapPackage tools;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
inherit packages;
|
inherit packages;
|
||||||
commands = attrsToNamedList commands;
|
commands = attrsToNamedList commands;
|
||||||
|
|
Loading…
Reference in a new issue