1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 22:20:51 +00:00

ddgr: 1.7 -> 1.8

This commit is contained in:
R. RyanTM 2020-04-09 02:16:42 +00:00 committed by Mario Rodas
parent c6fbd527d0
commit 1cab8bc0a6
No known key found for this signature in database
GPG key ID: 325649BCA6D53027

View file

@ -1,40 +1,38 @@
{stdenv, fetchFromGitHub, python3}: { stdenv, fetchFromGitHub, python3, installShellFiles }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.7"; version = "1.8";
pname = "ddgr"; pname = "ddgr";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jarun"; owner = "jarun";
repo = "ddgr"; repo = "ddgr";
rev = "v${version}"; rev = "v${version}";
sha256 = "0kcl8z9w8iwn3pxay1pfahhw6vs2l1dp60yfv3i19in4ac9va7m0"; sha256 = "1cyaindcg2vc3ij0p6b35inr01c6ys04izxsn1h70ixhsz46qg8z";
}; };
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ python3 ]; buildInputs = [ python3 ];
makeFlags = [ "PREFIX=$(out)" ]; makeFlags = [ "PREFIX=$(out)" ];
preBuild = '' # Version 1.8 was released as 1.7
# Version 1.7 was released as 1.6 postPatch = ''
# https://github.com/jarun/ddgr/pull/95 substituteInPlace ddgr --replace "_VERSION_ = '1.7'" "_VERSION_ = '${version}'"
sed -i "s/_VERSION_ = '1.6'/_VERSION_ = '1.7'/" ddgr
''; '';
postInstall = '' postInstall = ''
mkdir -p "$out/share/bash-completion/completions/" installShellCompletion --bash --name ddgr.bash auto-completion/bash/ddgr-completion.bash
cp "auto-completion/bash/ddgr-completion.bash" "$out/share/bash-completion/completions/" installShellCompletion --fish auto-completion/fish/ddgr.fish
mkdir -p "$out/share/fish/vendor_completions.d/" installShellCompletion --zsh auto-completion/zsh/_ddgr
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; { meta = with stdenv.lib; {
homepage = https://github.com/jarun/ddgr; homepage = "https://github.com/jarun/ddgr";
description = "Search DuckDuckGo from the terminal"; description = "Search DuckDuckGo from the terminal";
license = licenses.gpl3; license = licenses.gpl3;
maintainers = with maintainers; [ ceedubs markus1189 ]; maintainers = with maintainers; [ ceedubs markus1189 ];
platforms = platforms.unix; platforms = python3.meta.platforms;
}; };
} }