Unverified Commit a571ad40 authored by Dom Rodriguez's avatar Dom Rodriguez
Browse files

buildstream: Add support for bash/zsh completions

parent e2e2ccdb
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@
  lzip,
  patch,

  # nativeBuildInputs
  installShellFiles,

  # tests
  addBinToPathHook,
  gitMinimal,
@@ -62,6 +65,10 @@ python3Packages.buildPythonApplication rec {
    python3Packages.buildstream-plugins
  ];

  nativeBuildInputs = [
    installShellFiles
  ];

  buildInputs = [
    fuse3
    lzip
@@ -110,6 +117,12 @@ python3Packages.buildPythonApplication rec {
    "tests/internals/cascache.py"
  ];

  postInstall = ''
    installShellCompletion --cmd bst \
      --bash src/buildstream/data/bst \
      --zsh src/buildstream/data/zsh/_bst
  '';

  versionCheckProgram = "${placeholder "out"}/bin/bst";
  versionCheckProgramArg = "--version";