From 35325ecea96a18eea55566f55107dd01910967dc Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 11 Oct 2024 23:50:57 +0200 Subject: [PATCH] veryl: add shell completions --- pkgs/by-name/ve/veryl/package.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ve/veryl/package.nix b/pkgs/by-name/ve/veryl/package.nix index 90afbc757d6c..febb85b3c9b7 100644 --- a/pkgs/by-name/ve/veryl/package.nix +++ b/pkgs/by-name/ve/veryl/package.nix @@ -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 = {