packages/lib: devshell tools

This commit is contained in:
Max Headroom 2022-03-21 23:10:20 +01:00
parent 2c897db439
commit 4e9296656e

View file

@ -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;