diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2020-04-09 14:10:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 14:10:55 -0500 |
commit | 85354e73cb6df6247d22b95948d796d25946ee6e (patch) | |
tree | cc94312231dcab45611e246a8cea28f044d8fe9f /pkgs | |
parent | cab066ba74a67ce0005ba154c87d9dc41c3b5c8b (diff) | |
parent | 1cab8bc0a68b113fd72a8193505a9714c1e6cb05 (diff) |
Merge pull request #84767 from r-ryantm/auto-update/ddgr
ddgr: 1.7 -> 1.8
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/misc/ddgr/default.nix | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/pkgs/applications/misc/ddgr/default.nix b/pkgs/applications/misc/ddgr/default.nix index 7d211b26a422..c4639150dd4b 100644 --- a/pkgs/applications/misc/ddgr/default.nix +++ b/pkgs/applications/misc/ddgr/default.nix @@ -1,40 +1,38 @@ -{stdenv, fetchFromGitHub, python3}: +{ stdenv, fetchFromGitHub, python3, installShellFiles }: stdenv.mkDerivation rec { - version = "1.7"; + version = "1.8"; pname = "ddgr"; src = fetchFromGitHub { owner = "jarun"; repo = "ddgr"; rev = "v${version}"; - sha256 = "0kcl8z9w8iwn3pxay1pfahhw6vs2l1dp60yfv3i19in4ac9va7m0"; + sha256 = "1cyaindcg2vc3ij0p6b35inr01c6ys04izxsn1h70ixhsz46qg8z"; }; + nativeBuildInputs = [ installShellFiles ]; + buildInputs = [ python3 ]; makeFlags = [ "PREFIX=$(out)" ]; - preBuild = '' - # Version 1.7 was released as 1.6 - # https://github.com/jarun/ddgr/pull/95 - sed -i "s/_VERSION_ = '1.6'/_VERSION_ = '1.7'/" ddgr + # Version 1.8 was released as 1.7 + postPatch = '' + substituteInPlace ddgr --replace "_VERSION_ = '1.7'" "_VERSION_ = '${version}'" ''; 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/" + installShellCompletion --bash --name ddgr.bash auto-completion/bash/ddgr-completion.bash + installShellCompletion --fish auto-completion/fish/ddgr.fish + installShellCompletion --zsh auto-completion/zsh/_ddgr ''; meta = with stdenv.lib; { - homepage = https://github.com/jarun/ddgr; + homepage = "https://github.com/jarun/ddgr"; description = "Search DuckDuckGo from the terminal"; license = licenses.gpl3; maintainers = with maintainers; [ ceedubs markus1189 ]; - platforms = platforms.unix; + platforms = python3.meta.platforms; }; } |