flutter: add shell completions (#509723)

This commit is contained in:
Sandro
2026-05-12 00:07:44 +00:00
committed by GitHub
@@ -26,6 +26,7 @@
which,
jq,
writableTmpDirAsHomeHook,
installShellFiles,
flutterTools ? null,
}@args:
@@ -70,6 +71,7 @@ let
makeWrapper
jq
gitMinimal
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ];
strictDeps = true;
@@ -158,6 +160,12 @@ let
runHook postInstall
'';
postInstall = ''
$out/bin/flutter bash-completion "$TMPDIR/flutter.bash"
installShellCompletion --bash "$TMPDIR/flutter.bash"
installShellCompletion --zsh "$TMPDIR/flutter.bash"
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
which