rex: install shell completions

authored by Aaron Bieber and committed by Rick van Schijndel e2a7510f 63dd9fb5

+13 -2
+13 -2
pkgs/tools/system/rex/default.nix
··· 1 - { pkgs, lib, fetchurl, perlPackages, rsync, ... }: 1 + { pkgs, lib, fetchurl, perlPackages, rsync, installShellFiles, ... }: 2 2 3 3 perlPackages.buildPerlPackage rec { 4 4 pname = "Rex"; ··· 18 18 rsync 19 19 ]; 20 20 21 - nativeBuildInputs = with perlPackages; [ ParallelForkManager ]; 21 + nativeBuildInputs = with perlPackages; [ installShellFiles ParallelForkManager ]; 22 22 23 23 propagatedBuildInputs = with perlPackages; [ 24 24 AWSSignature4 ··· 43 43 ]; 44 44 45 45 doCheck = false; 46 + 47 + outputs = [ "out" ]; 48 + 49 + fixupPhase = '' 50 + for sh in bash zsh; do 51 + substituteInPlace ./share/rex-tab-completion.$sh \ 52 + --replace 'perl' "${pkgs.perl.withPackages (ps: [ ps.YAML ])}/bin/perl" 53 + done 54 + installShellCompletion --name _rex --zsh ./share/rex-tab-completion.zsh 55 + installShellCompletion --name rex --bash ./share/rex-tab-completion.bash 56 + ''; 46 57 47 58 meta = { 48 59 homepage = "https://www.rexify.org";