mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
tinymist: generate shell completion (#370033)
This commit is contained in:
commit
1ef77d2fdc
1 changed files with 18 additions and 1 deletions
|
@ -1,11 +1,14 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
installShellFiles,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
libgit2,
|
libgit2,
|
||||||
openssl,
|
openssl,
|
||||||
zlib,
|
zlib,
|
||||||
|
buildPackages,
|
||||||
versionCheckHook,
|
versionCheckHook,
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
vscode-extensions,
|
vscode-extensions,
|
||||||
|
@ -27,7 +30,10 @@ rustPlatform.buildRustPackage rec {
|
||||||
useFetchCargoVendor = true;
|
useFetchCargoVendor = true;
|
||||||
cargoHash = "sha256-+Ce9qIETGFZXG4RX5GP8tpmH4fkpbPkDS1FX64NQ6/4=";
|
cargoHash = "sha256-+Ce9qIETGFZXG4RX5GP8tpmH4fkpbPkDS1FX64NQ6/4=";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [
|
||||||
|
installShellFiles
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libgit2
|
libgit2
|
||||||
|
@ -59,6 +65,17 @@ rustPlatform.buildRustPackage rec {
|
||||||
"--skip=semantic_tokens_full::tests::test"
|
"--skip=semantic_tokens_full::tests::test"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall =
|
||||||
|
let
|
||||||
|
emulator = stdenv.hostPlatform.emulator buildPackages;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
installShellCompletion --cmd tinymist \
|
||||||
|
--bash <(${emulator} $out/bin/tinymist completion bash) \
|
||||||
|
--fish <(${emulator} $out/bin/tinymist completion fish) \
|
||||||
|
--zsh <(${emulator} $out/bin/tinymist completion zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
nativeInstallCheckInputs = [
|
nativeInstallCheckInputs = [
|
||||||
versionCheckHook
|
versionCheckHook
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue