Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / ddgr / default.nix
bloba9e87e72405983b6821728ee7945fe63b2e4588a
1 { lib, stdenv, fetchFromGitHub, python3, installShellFiles }:
3 stdenv.mkDerivation rec {
4   version = "2.1";
5   pname = "ddgr";
7   src = fetchFromGitHub {
8     owner = "jarun";
9     repo = "ddgr";
10     rev = "v${version}";
11     sha256 = "sha256-D5FUhv1moQKzcLj/3VWJNs24jTXJir1dMpv59orPTtc=";
12   };
14   nativeBuildInputs = [ installShellFiles ];
16   buildInputs = [ python3 ];
18   makeFlags = [ "PREFIX=$(out)" ];
20   postInstall = ''
21     installShellCompletion --bash --name ddgr.bash auto-completion/bash/ddgr-completion.bash
22     installShellCompletion --fish auto-completion/fish/ddgr.fish
23     installShellCompletion --zsh auto-completion/zsh/_ddgr
24   '';
26   meta = with lib; {
27     homepage = "https://github.com/jarun/ddgr";
28     description = "Search DuckDuckGo from the terminal";
29     license = licenses.gpl3;
30     maintainers = with maintainers; [ ceedubs markus1189 ];
31     platforms = python3.meta.platforms;
32   };