diff options
author | gbtb <goodbetterthebeast3@gmail.com> | 2024-02-18 23:41:53 +1000 |
---|---|---|
committer | gbtb <goodbetterthebeast3@gmail.com> | 2024-03-30 20:49:56 +1000 |
commit | 5eca3b06e77995448ae29a95efe79b2d0e6a0e65 (patch) | |
tree | 986a89af007718fdcc0c6e0fb640136aecef37f7 /pkgs/development/compilers/dotnet/common.nix | |
parent | 3eddf3150a969b58f35f4f27d22fb7dd1274916a (diff) |
dotnet: added shell completion scripts
Diffstat (limited to 'pkgs/development/compilers/dotnet/common.nix')
-rw-r--r-- | pkgs/development/compilers/dotnet/common.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/compilers/dotnet/common.nix b/pkgs/development/compilers/dotnet/common.nix index 63b3a7de374ef..e88ddfb3e37f1 100644 --- a/pkgs/development/compilers/dotnet/common.nix +++ b/pkgs/development/compilers/dotnet/common.nix @@ -6,6 +6,7 @@ , runCommand , expect , curl +, installShellFiles }: type: args: stdenv.mkDerivation (finalAttrs: args // { doInstallCheck = true; @@ -27,6 +28,16 @@ export DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK=1 # Skip integrity check on first run, which fails due to read-only directory '' + args.setupHook or ""); + nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ installShellFiles ]; + + postInstall = '' + # completions snippets taken from https://learn.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete + installShellCompletion --cmd dotnet \ + --bash ${./completions/dotnet.bash} \ + --zsh ${./completions/dotnet.zsh} \ + --fish ${./completions/dotnet.fish} + ''; + } // lib.optionalAttrs (type == "sdk") { passthru = { tests = let |