2020-08-20 17:08:02 +00:00
|
|
|
{ stdenv, fetchFromGitHub, python, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "googler";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "4.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jarun";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-10-16 20:44:37 +00:00
|
|
|
sha256 = "04wa0mlbfjnzwham2dpd9lch7800js4vp3ikgjl4qnwilvr1lw74";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
buildInputs = [ python ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2020-08-20 17:08:02 +00: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
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/jarun/googler";
|
|
|
|
description = "Google Search, Google Site Search, Google News from the terminal";
|
2020-10-16 20:44:37 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-11-19 00:13:47 +00:00
|
|
|
maintainers = with maintainers; [ koral Br1ght0ne ];
|
2020-08-20 17:08:02 +00:00
|
|
|
platforms = python.meta.platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|