You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default.nix 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {stdenv, fetchFromGitHub, python3}:
  2. stdenv.mkDerivation rec {
  3. version = "1.7";
  4. pname = "ddgr";
  5. src = fetchFromGitHub {
  6. owner = "jarun";
  7. repo = "ddgr";
  8. rev = "v${version}";
  9. sha256 = "0kcl8z9w8iwn3pxay1pfahhw6vs2l1dp60yfv3i19in4ac9va7m0";
  10. };
  11. buildInputs = [ python3 ];
  12. makeFlags = "PREFIX=$(out)";
  13. preBuild = ''
  14. # Version 1.7 was released as 1.6
  15. # https://github.com/jarun/ddgr/pull/95
  16. sed -i "s/_VERSION_ = '1.6'/_VERSION_ = '1.7'/" ddgr
  17. '';
  18. postInstall = ''
  19. mkdir -p "$out/share/bash-completion/completions/"
  20. cp "auto-completion/bash/ddgr-completion.bash" "$out/share/bash-completion/completions/"
  21. mkdir -p "$out/share/fish/vendor_completions.d/"
  22. cp "auto-completion/fish/ddgr.fish" "$out/share/fish/vendor_completions.d/"
  23. mkdir -p "$out/share/zsh/site-functions/"
  24. cp "auto-completion/zsh/_ddgr" "$out/share/zsh/site-functions/"
  25. '';
  26. meta = with stdenv.lib; {
  27. homepage = https://github.com/jarun/ddgr;
  28. description = "Search DuckDuckGo from the terminal";
  29. license = licenses.gpl3;
  30. maintainers = with maintainers; [ ceedubs markus1189 ];
  31. platforms = platforms.unix;
  32. };
  33. }