2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python, installShellFiles }:
|
2017-10-01 20:56:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "googler";
|
2021-01-22 12:38:39 +00:00
|
|
|
version = "4.3.2";
|
2017-10-01 20:56:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jarun";
|
2019-12-05 21:28:16 +00:00
|
|
|
repo = pname;
|
2017-10-01 20:56:38 +00:00
|
|
|
rev = "v${version}";
|
2021-01-22 12:38:39 +00:00
|
|
|
sha256 = "sha256-PgWg396AQ15CAnfTXGDpSg1UXx7mNCtknEjJd/KV4MU=";
|
2017-10-01 20:56:38 +00:00
|
|
|
};
|
|
|
|
|
2020-07-31 05:00:00 +00:00
|
|
|
buildInputs = [ python ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2017-10-01 20:56:38 +00:00
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2017-10-01 20:56:38 +00:00
|
|
|
|
2020-07-31 05:00:00 +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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-12-05 21:28:16 +00:00
|
|
|
homepage = "https://github.com/jarun/googler";
|
2017-10-01 20:56:38 +00:00
|
|
|
description = "Google Search, Google Site Search, Google News from the terminal";
|
2020-10-13 19:12:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-11-17 11:02:06 +00:00
|
|
|
maintainers = with maintainers; [ koral Br1ght0ne ];
|
2020-07-31 05:00:00 +00:00
|
|
|
platforms = python.meta.platforms;
|
2017-10-01 20:56:38 +00:00
|
|
|
};
|
|
|
|
}
|