Commit 35325ece authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt
Browse files

veryl: add shell completions

parent 4cbccd49
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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 = {