2025-04-02 20:37:22 +01:00
|
|
|
{ symlinkJoin, nushell, zoxide, makeWrapper, system, inputs, }:
|
2025-02-10 20:28:46 +00:00
|
|
|
symlinkJoin {
|
|
|
|
name = "nu";
|
|
|
|
|
2025-04-02 20:37:22 +01:00
|
|
|
paths =
|
|
|
|
[ nushell inputs.self.packages.${system}.amadaluzian-starship zoxide ];
|
2025-02-10 20:28:46 +00:00
|
|
|
|
2025-04-02 20:37:22 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2025-02-10 20:28:46 +00:00
|
|
|
|
2025-04-02 20:37:22 +01:00
|
|
|
passthru = { inherit (nushell.passthru) shellPath; };
|
2025-02-10 20:28:46 +00:00
|
|
|
|
2025-04-02 20:37:22 +01:00
|
|
|
meta = { inherit (nushell.meta) mainProgram; };
|
2025-02-10 20:28:46 +00:00
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/nu \
|
2025-02-17 04:40:13 +00:00
|
|
|
--set NUSHELL_CONFIG_DIR "${./cfg}" \
|
|
|
|
--add-flags "--env-config" \
|
|
|
|
--add-flags "${./cfg/env.nu}" \
|
|
|
|
--add-flags "--config" \
|
|
|
|
--add-flags "${./cfg/config.nu}" \
|
2025-02-10 20:28:46 +00:00
|
|
|
'';
|
|
|
|
}
|