2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, installShellFiles }:
|
2017-12-04 18:30:38 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-03-06 05:56:56 +01:00
|
|
|
version = "2.0";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "ddgr";
|
2017-12-04 18:30:38 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jarun";
|
|
|
|
repo = "ddgr";
|
|
|
|
rev = "v${version}";
|
2022-03-06 05:56:56 +01:00
|
|
|
sha256 = "sha256-otfa2t/tfpYKqQu+VQxRKryUsIxM3JKILc3zseTC2KM=";
|
2017-12-04 18:30:38 +01:00
|
|
|
};
|
|
|
|
|
2020-04-09 04:16:42 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2019-02-20 23:21:37 +01:00
|
|
|
buildInputs = [ python3 ];
|
2017-12-04 18:30:38 +01:00
|
|
|
|
2019-10-27 14:03:25 +01:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2017-12-04 18:30:38 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2020-04-09 04:16:42 +02: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 18:30:38 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-09 04:16:42 +02:00
|
|
|
homepage = "https://github.com/jarun/ddgr";
|
2017-12-04 18:30:38 +01:00
|
|
|
description = "Search DuckDuckGo from the terminal";
|
|
|
|
license = licenses.gpl3;
|
2019-02-20 23:21:37 +01:00
|
|
|
maintainers = with maintainers; [ ceedubs markus1189 ];
|
2020-04-09 04:16:42 +02:00
|
|
|
platforms = python3.meta.platforms;
|
2017-12-04 18:30:38 +01:00
|
|
|
};
|
|
|
|
}
|