nixpkgs/pkgs/applications/misc/googler/default.nix

34 lines
958 B
Nix
Raw Normal View History

2020-07-31 06:00:00 +01:00
{ stdenv, fetchFromGitHub, python, installShellFiles }:
2017-10-01 21:56:38 +01:00
stdenv.mkDerivation rec {
pname = "googler";
2020-10-13 20:12:52 +01:00
version = "4.3.1";
2017-10-01 21:56:38 +01:00
src = fetchFromGitHub {
owner = "jarun";
repo = pname;
2017-10-01 21:56:38 +01:00
rev = "v${version}";
2020-10-13 20:12:52 +01:00
sha256 = "04wa0mlbfjnzwham2dpd9lch7800js4vp3ikgjl4qnwilvr1lw74";
2017-10-01 21:56:38 +01:00
};
2020-07-31 06:00:00 +01:00
buildInputs = [ python ];
nativeBuildInputs = [ installShellFiles ];
2017-10-01 21:56:38 +01:00
makeFlags = [ "PREFIX=$(out)" ];
2017-10-01 21:56:38 +01:00
2020-07-31 06:00:00 +01:00
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
'';
2017-10-01 21:56:38 +01:00
meta = with stdenv.lib; {
homepage = "https://github.com/jarun/googler";
2017-10-01 21:56:38 +01:00
description = "Google Search, Google Site Search, Google News from the terminal";
2020-10-13 20:12:52 +01:00
license = licenses.gpl3Plus;
2019-12-05 21:28:49 +00:00
maintainers = with maintainers; [ koral filalex77 ];
2020-07-31 06:00:00 +01:00
platforms = python.meta.platforms;
2017-10-01 21:56:38 +01:00
};
}