From 75a0709f6733ae627998eb718f2a4602c0cff1b7 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Mon, 13 Jun 2022 11:09:38 +0200 Subject: [PATCH] luaPackages.busted: install shell completion via installShellCompletion --- pkgs/development/lua-modules/overrides.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 68a63201ded8..1fe4cd3574f1 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -15,13 +15,17 @@ with prev; }); busted = prev.busted.overrideAttrs(oa: { + nativeBuildInputs = [ + pkgs.installShellFiles + ]; postConfigure = '' substituteInPlace ''${rockspecFilename} \ --replace "'lua_cliargs = 3.0-1'," "'lua_cliargs >= 3.0-1'," ''; postInstall = '' - install -D completions/zsh/_busted $out/share/zsh/site-functions/_busted - install -D completions/bash/busted.bash $out/share/bash-completion/completions/busted + installShellCompletion --cmd busted \ + --zsh completions/zsh/_busted \ + --bash completions/bash/busted.bash ''; });