diff --git a/pkgs/tools/system/rex/default.nix b/pkgs/tools/system/rex/default.nix index 2bb67333121e..cf59a22cecee 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";