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