openbao: Install bash shell completions

This commit is contained in:
Ilan Joselevich
2025-04-26 18:24:06 +03:00
parent 4750344107
commit 3952f1a06e
+8
View File
@@ -3,6 +3,7 @@
fetchFromGitHub,
buildGoModule,
go_1_24,
installShellFiles,
versionCheckHook,
nix-update-script,
nixosTests,
@@ -43,8 +44,15 @@ buildGoModule.override { go = go_1_24; } (finalAttrs: {
cp -r --no-preserve=mode ${finalAttrs.passthru.ui} http/web_ui
'';
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
mv $out/bin/openbao $out/bin/bao
# https://github.com/posener/complete/blob/9a4745ac49b29530e07dc2581745a218b646b7a3/cmd/install/bash.go#L8
installShellCompletion --bash --name bao <(echo complete -C "$out/bin/bao" bao)
'';
nativeInstallCheckInputs = [