about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/googler/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/googler/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/googler/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/googler/default.nix b/nixpkgs/pkgs/applications/misc/googler/default.nix
new file mode 100644
index 000000000000..7a096b52314a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/googler/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, python, installShellFiles }:
+
+stdenv.mkDerivation rec {
+  pname = "googler";
+  version = "4.3.1";
+
+  src = fetchFromGitHub {
+    owner = "jarun";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "04wa0mlbfjnzwham2dpd9lch7800js4vp3ikgjl4qnwilvr1lw74";
+  };
+
+  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.gpl3Plus;
+    maintainers = with maintainers; [ koral Br1ght0ne ];
+    platforms = python.meta.platforms;
+  };
+}