veryl: add shell completions

This commit is contained in:
Peder Bergebakken Sundt 2024-10-11 23:50:57 +02:00
parent 4cbccd4923
commit 35325ecea9

View File

@ -3,6 +3,7 @@
rustPlatform,
fetchFromGitHub,
pkg-config,
installShellFiles,
dbus,
stdenv,
darwin,
@ -24,6 +25,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs =
@ -37,6 +39,13 @@ rustPlatform.buildRustPackage rec {
darwin.apple_sdk.frameworks.SystemConfiguration
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd veryl \
--bash <($out/bin/veryl metadata --completion bash) \
--fish <($out/bin/veryl metadata --completion fish) \
--zsh <($out/bin/veryl metadata --completion zsh)
'';
checkFlags = [
# takes over an hour
"--skip=tests::progress"
@ -53,7 +62,6 @@ rustPlatform.buildRustPackage rec {
"--skip=analyzer::test_68_std"
"--skip=emitter::test_25_dependency"
"--skip=emitter::test_68_std"
];
meta = {