2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "2.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ddgr";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jarun";
|
|
|
|
repo = "ddgr";
|
|
|
|
rev = "v${version}";
|
2022-10-30 15:09:59 +00:00
|
|
|
sha256 = "sha256-D5FUhv1moQKzcLj/3VWJNs24jTXJir1dMpv59orPTtc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --bash --name ddgr.bash auto-completion/bash/ddgr-completion.bash
|
|
|
|
installShellCompletion --fish auto-completion/fish/ddgr.fish
|
|
|
|
installShellCompletion --zsh auto-completion/zsh/_ddgr
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/jarun/ddgr";
|
|
|
|
description = "Search DuckDuckGo from the terminal";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ ceedubs markus1189 ];
|
|
|
|
platforms = python3.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|