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 , python3Packages 3 , fetchFromGitHub 4 , systemd 5 - , xrandr }: 6 7 stdenv.mkDerivation rec { 8 pname = "autorandr"; 9 version = "1.11"; 10 11 buildInputs = [ python3Packages.python ]; 12 13 # no wrapper, as autorandr --batch does os.environ.clear() 14 buildPhase = '' ··· 23 runHook preInstall 24 make install TARGETS='autorandr' PREFIX=$out 25 26 - make install TARGETS='bash_completion' DESTDIR=$out/share/bash-completion/completions 27 28 make install TARGETS='autostart_config' PREFIX=$out DESTDIR=$out 29
··· 2 , python3Packages 3 , fetchFromGitHub 4 , systemd 5 + , xrandr 6 + , installShellFiles }: 7 8 stdenv.mkDerivation rec { 9 pname = "autorandr"; 10 version = "1.11"; 11 12 buildInputs = [ python3Packages.python ]; 13 + 14 + nativeBuildInputs = [ installShellFiles ]; 15 16 # no wrapper, as autorandr --batch does os.environ.clear() 17 buildPhase = '' ··· 26 runHook preInstall 27 make install TARGETS='autorandr' PREFIX=$out 28 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 35 36 make install TARGETS='autostart_config' PREFIX=$out DESTDIR=$out 37