meson: install shell completions

meson ships with both bash and zsh completions, the zsh completions are
more complete than the bash ones.
This commit is contained in:
Dylan Baker 2020-12-22 16:45:06 -08:00 committed by Jonathan Ringer
parent f1957cd789
commit 1bf598874f

@ -4,6 +4,7 @@
, writeTextDir
, substituteAll
, fetchpatch
, installShellFiles
}:
python3.pkgs.buildPythonApplication rec {
@ -77,6 +78,13 @@ python3.pkgs.buildPythonApplication rec {
rm $out/nix-support/propagated-build-inputs
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --zsh data/shell-completions/zsh/_meson
installShellCompletion --bash data/shell-completions/bash/meson
'';
meta = with lib; {
homepage = "https://mesonbuild.com";
description = "SCons-like build system that use python as a front-end language and Ninja as a building backend";