File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 11{
22 lib ,
3+ stdenv ,
34 rustPlatform ,
45 fetchFromGitHub ,
6+ installShellFiles ,
57 pkg-config ,
68 libgit2 ,
79 openssl ,
810 zlib ,
11+ buildPackages ,
912 versionCheckHook ,
1013 nix-update-script ,
1114 vscode-extensions ,
@@ -27,7 +30,10 @@ rustPlatform.buildRustPackage rec {
2730 useFetchCargoVendor = true ;
2831 cargoHash = "sha256-+Ce9qIETGFZXG4RX5GP8tpmH4fkpbPkDS1FX64NQ6/4=" ;
2932
30- nativeBuildInputs = [ pkg-config ] ;
33+ nativeBuildInputs = [
34+ installShellFiles
35+ pkg-config
36+ ] ;
3137
3238 buildInputs = [
3339 libgit2
@@ -59,6 +65,17 @@ rustPlatform.buildRustPackage rec {
5965 "--skip=semantic_tokens_full::tests::test"
6066 ] ;
6167
68+ postInstall =
69+ let
70+ emulator = stdenv . hostPlatform . emulator buildPackages ;
71+ in
72+ ''
73+ installShellCompletion --cmd tinymist \
74+ --bash <(${ emulator } $out/bin/tinymist completion bash) \
75+ --fish <(${ emulator } $out/bin/tinymist completion fish) \
76+ --zsh <(${ emulator } $out/bin/tinymist completion zsh)
77+ '' ;
78+
6279 nativeInstallCheckInputs = [
6380 versionCheckHook
6481 ] ;
You can’t perform that action at this time.
0 commit comments