From e4980d99d2a7859288747944087d9ff30ad27c59 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 31 Jul 2020 00:00:00 -0500 Subject: [PATCH] googler: install completions --- pkgs/applications/misc/googler/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/googler/default.nix b/pkgs/applications/misc/googler/default.nix index 58cddc1484e..de93dc6f43e 100644 --- a/pkgs/applications/misc/googler/default.nix +++ b/pkgs/applications/misc/googler/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, python }: +{ stdenv, fetchFromGitHub, python, installShellFiles }: stdenv.mkDerivation rec { pname = "googler"; @@ -11,15 +11,23 @@ stdenv.mkDerivation rec { sha256 = "0c480wzc7q4pks1f6mnayr580c73jhzshliz4hgznzc7zwcdf41w"; }; - propagatedBuildInputs = [ python ]; + buildInputs = [ python ]; + + nativeBuildInputs = [ installShellFiles ]; makeFlags = [ "PREFIX=$(out)" ]; + postInstall = '' + installShellCompletion --bash --name googler.bash auto-completion/bash/googler-completion.bash + installShellCompletion --fish auto-completion/fish/googler.fish + installShellCompletion --zsh auto-completion/zsh/_googler + ''; + meta = with stdenv.lib; { homepage = "https://github.com/jarun/googler"; description = "Google Search, Google Site Search, Google News from the terminal"; license = licenses.gpl3; maintainers = with maintainers; [ koral filalex77 ]; - platforms = platforms.unix; + platforms = python.meta.platforms; }; }