diff options
author | Aaron Bieber <aaron@bolddaemon.com> | 2023-01-13 05:47:24 -0700 |
---|---|---|
committer | Rick van Schijndel <Mindavi@users.noreply.github.com> | 2023-02-09 19:12:21 +0100 |
commit | e2a7510f3db12db9820fd45c8edcb6f5c4b33935 (patch) | |
tree | f221110f1b9595d25d9f1a181ce63141c221c498 | |
parent | 63dd9fb5c8b99209ea9fea0ab9aeb82f2710dba0 (diff) |
rex: install shell completions
-rw-r--r-- | pkgs/tools/system/rex/default.nix | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/tools/system/rex/default.nix b/pkgs/tools/system/rex/default.nix index 2bb67333121e8..cf59a22cecee2 100644 --- a/pkgs/tools/system/rex/default.nix +++ b/pkgs/tools/system/rex/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, fetchurl, perlPackages, rsync, ... }: +{ pkgs, lib, fetchurl, perlPackages, rsync, installShellFiles, ... }: perlPackages.buildPerlPackage rec { pname = "Rex"; @@ -18,7 +18,7 @@ perlPackages.buildPerlPackage rec { rsync ]; - nativeBuildInputs = with perlPackages; [ ParallelForkManager ]; + nativeBuildInputs = with perlPackages; [ installShellFiles ParallelForkManager ]; propagatedBuildInputs = with perlPackages; [ AWSSignature4 @@ -44,6 +44,17 @@ perlPackages.buildPerlPackage rec { doCheck = false; + outputs = [ "out" ]; + + fixupPhase = '' + for sh in bash zsh; do + substituteInPlace ./share/rex-tab-completion.$sh \ + --replace 'perl' "${pkgs.perl.withPackages (ps: [ ps.YAML ])}/bin/perl" + done + installShellCompletion --name _rex --zsh ./share/rex-tab-completion.zsh + installShellCompletion --name rex --bash ./share/rex-tab-completion.bash + ''; + meta = { homepage = "https://www.rexify.org"; description = "The friendly automation framework"; |