flutter: add shell completions (#509723)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user