tinymist: generate shell completion (#370033)

authored by Gaétan Lepage and committed by GitHub 1ef77d2f c5aaf462

+18 -1
+18 -1
pkgs/by-name/ti/tinymist/package.nix
··· 1 1 { 2 2 lib, 3 + stdenv, 3 4 rustPlatform, 4 5 fetchFromGitHub, 6 + installShellFiles, 5 7 pkg-config, 6 8 libgit2, 7 9 openssl, 8 10 zlib, 11 + buildPackages, 9 12 versionCheckHook, 10 13 nix-update-script, 11 14 vscode-extensions, ··· 27 30 useFetchCargoVendor = true; 28 31 cargoHash = "sha256-+Ce9qIETGFZXG4RX5GP8tpmH4fkpbPkDS1FX64NQ6/4="; 29 32 30 - nativeBuildInputs = [ pkg-config ]; 33 + nativeBuildInputs = [ 34 + installShellFiles 35 + pkg-config 36 + ]; 31 37 32 38 buildInputs = [ 33 39 libgit2 ··· 58 64 "--skip=rename::tests::test" 59 65 "--skip=semantic_tokens_full::tests::test" 60 66 ]; 67 + 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 + ''; 61 78 62 79 nativeInstallCheckInputs = [ 63 80 versionCheckHook