2020-04-09 03:16:42 +01:00
|
|
|
{ stdenv, fetchFromGitHub, python3, installShellFiles }:
|
2017-12-04 17:30:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-07-26 17:52:01 +01:00
|
|
|
version = "1.9";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ddgr";
|
2017-12-04 17:30:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jarun";
|
|
|
|
repo = "ddgr";
|
|
|
|
rev = "v${version}";
|
2020-07-26 17:52:01 +01:00
|
|
|
sha256 = "0qbdq7k0mmvkjp6qzz88n7vf29liqn6y5w4y39ldqdc8hzw5sld7";
|
2017-12-04 17:30:38 +00:00
|
|
|
};
|
|
|
|
|
2020-04-09 03:16:42 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2019-02-20 22:21:37 +00:00
|
|
|
buildInputs = [ python3 ];
|
2017-12-04 17:30:38 +00:00
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2017-12-04 17:30:38 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2020-04-09 03:16:42 +01:00
|
|
|
installShellCompletion --bash --name ddgr.bash auto-completion/bash/ddgr-completion.bash
|
|
|
|
installShellCompletion --fish auto-completion/fish/ddgr.fish
|
|
|
|
installShellCompletion --zsh auto-completion/zsh/_ddgr
|
2017-12-04 17:30:38 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-09 03:16:42 +01:00
|
|
|
homepage = "https://github.com/jarun/ddgr";
|
2017-12-04 17:30:38 +00:00
|
|
|
description = "Search DuckDuckGo from the terminal";
|
|
|
|
license = licenses.gpl3;
|
2019-02-20 22:21:37 +00:00
|
|
|
maintainers = with maintainers; [ ceedubs markus1189 ];
|
2020-04-09 03:16:42 +01:00
|
|
|
platforms = python3.meta.platforms;
|
2017-12-04 17:30:38 +00:00
|
|
|
};
|
|
|
|
}
|