Merge pull request #148678 from anund/fix_autorandr_zsh_completions

autorandr: install zsh completions

authored by Jörg Thalheim and committed by GitHub b1d73d99 b3e267d7

+10 -2
+10 -2
pkgs/tools/misc/autorandr/default.nix
··· 2 2 , python3Packages 3 3 , fetchFromGitHub 4 4 , systemd 5 - , xrandr }: 5 + , xrandr 6 + , installShellFiles }: 6 7 7 8 stdenv.mkDerivation rec { 8 9 pname = "autorandr"; 9 10 version = "1.11"; 10 11 11 12 buildInputs = [ python3Packages.python ]; 13 + 14 + nativeBuildInputs = [ installShellFiles ]; 12 15 13 16 # no wrapper, as autorandr --batch does os.environ.clear() 14 17 buildPhase = '' ··· 23 26 runHook preInstall 24 27 make install TARGETS='autorandr' PREFIX=$out 25 28 26 - make install TARGETS='bash_completion' DESTDIR=$out/share/bash-completion/completions 29 + # zsh completions exist but currently have no make target, use 30 + # installShellCompletions for both 31 + # see https://github.com/phillipberndt/autorandr/issues/197 32 + installShellCompletion --cmd autorandr \ 33 + --bash contrib/bash_completion/autorandr \ 34 + --zsh contrib/zsh_completion/_autorandr 27 35 28 36 make install TARGETS='autostart_config' PREFIX=$out DESTDIR=$out 29 37