Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cab066ba74a6
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 85354e73cb6d
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 9, 2020

  1. ddgr: 1.7 -> 1.8

    r-ryantm authored and marsam committed Apr 9, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    1cab8bc View commit details
  2. Merge pull request #84767 from r-ryantm/auto-update/ddgr

    ddgr: 1.7 -> 1.8
    marsam authored Apr 9, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    85354e7 View commit details
Showing with 13 additions and 15 deletions.
  1. +13 −15 pkgs/applications/misc/ddgr/default.nix
28 changes: 13 additions & 15 deletions pkgs/applications/misc/ddgr/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}