2019-06-16 21:59:06 +02:00
|
|
|
{stdenv, fetchFromGitHub, python3}:
|
2017-12-04 18:30:38 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-02-20 23:21:37 +01:00
|
|
|
version = "1.6";
|
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}";
|
2019-02-20 23:21:37 +01:00
|
|
|
sha256 = "04ybbjsf9hpn2p5cjjm15cwvv0mwrmdi19iifrym6ps3rmll0p3c";
|
2017-12-04 18:30:38 +01:00
|
|
|
};
|
|
|
|
|
2019-02-20 23:21:37 +01:00
|
|
|
buildInputs = [ python3 ];
|
2017-12-04 18:30:38 +01:00
|
|
|
|
|
|
|
makeFlags = "PREFIX=$(out)";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share/bash-completion/completions/"
|
|
|
|
cp "auto-completion/bash/ddgr-completion.bash" "$out/share/bash-completion/completions/"
|
|
|
|
mkdir -p "$out/share/fish/vendor_completions.d/"
|
|
|
|
cp "auto-completion/fish/ddgr.fish" "$out/share/fish/vendor_completions.d/"
|
|
|
|
mkdir -p "$out/share/zsh/site-functions/"
|
|
|
|
cp "auto-completion/zsh/_ddgr" "$out/share/zsh/site-functions/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/jarun/ddgr;
|
|
|
|
description = "Search DuckDuckGo from the terminal";
|
|
|
|
license = licenses.gpl3;
|
2019-02-20 23:21:37 +01:00
|
|
|
maintainers = with maintainers; [ ceedubs markus1189 ];
|
2017-12-04 18:30:38 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|