alqages/packages/amadaluzian-nu/default.nix

33 lines
595 B
Nix
Raw Permalink Normal View History

2025-04-02 21:06:44 +01:00
{
symlinkJoin,
nushell,
zoxide,
makeWrapper,
system,
inputs,
}:
2025-02-10 20:28:46 +00:00
symlinkJoin {
name = "nu";
2025-04-02 21:06:44 +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 \
--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
'';
}