depot/pkgs/applications/misc/googler/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

34 lines
984 B
Nix

{ lib, stdenv, fetchFromGitHub, python, installShellFiles }:
stdenv.mkDerivation rec {
pname = "googler";
version = "4.3.2";
src = fetchFromGitHub {
owner = "jarun";
repo = pname;
rev = "v${version}";
sha256 = "sha256-PgWg396AQ15CAnfTXGDpSg1UXx7mNCtknEjJd/KV4MU=";
};
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 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;
mainProgram = "googler";
};
}