2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ddgr";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jarun";
|
|
|
|
repo = "ddgr";
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-88cCQm3eViy0OwSyCTlnW7uuiFwz2/6Wz45QzxCgXxg=";
|
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;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "ddgr";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|