diff --git a/pkgs/development/compilers/flutter/flutter.nix b/pkgs/development/compilers/flutter/flutter.nix index 80bc56cd149d..e14f5948fc0b 100644 --- a/pkgs/development/compilers/flutter/flutter.nix +++ b/pkgs/development/compilers/flutter/flutter.nix @@ -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