feat(wrapping): introduce wrapped configurations

This commit is contained in:
Artur Manuel 2025-01-25 05:44:26 +00:00
commit 2aa24ab2b9
22 changed files with 883 additions and 135 deletions

View file

@ -0,0 +1,37 @@
{
symlinkJoin,
nushell,
amadaluzian-starship,
zoxide,
makeWrapper,
}:
symlinkJoin {
name = "nu";
paths = [
nushell
amadaluzian-starship
zoxide
];
nativeBuildInputs = [
makeWrapper
];
passthru = {
inherit (nushell.passthru) shellPath;
};
meta = {
inherit (nushell.meta) mainProgram;
};
postBuild = ''
wrapProgram $out/bin/nu \
--set NU_CONFIG_DIR "${./cfg}" \
--add-flags '--env-config' \
--add-flags '$NU_CONFIG_DIR/env.nu' \
--add-flags '--config' \
--add-flags '$NU_CONFIG_DIR/config.nu' \
'';
}