From 1bf598874faf12791607cfa25d1067d35dc6ca32 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 22 Dec 2020 16:45:06 -0800 Subject: [PATCH] meson: install shell completions meson ships with both bash and zsh completions, the zsh completions are more complete than the bash ones. --- pkgs/development/tools/build-managers/meson/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index cd506b970f6..890c457da05 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -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";