/pkgs/tools/text/ripgrep/default.nix

https://github.com/cbpark/nixpkgs · Nix · 30 lines · 24 code · 6 blank · 0 comment · 0 complexity · add0bc0e22ebfd079cb7f3afe5328350 MD5 · raw file

  1. { stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
  2. with rustPlatform;
  3. buildRustPackage rec {
  4. name = "ripgrep-${version}";
  5. version = "0.7.1";
  6. src = fetchFromGitHub {
  7. owner = "BurntSushi";
  8. repo = "ripgrep";
  9. rev = "${version}";
  10. sha256 = "0z3f83vhy464k93bc55i9lr6z41163q96if938p9ndhx2q3a20ql";
  11. };
  12. cargoSha256 = "1d6s01gmyfzb0vdf7flq6nvlapwcgbj0mzcprzyg4nj5gjkvznrn";
  13. preFixup = ''
  14. mkdir -p "$out/man/man1"
  15. cp "$src/doc/rg.1" "$out/man/man1"
  16. '';
  17. meta = with stdenv.lib; {
  18. description = "A utility that combines the usability of The Silver Searcher with the raw speed of grep";
  19. homepage = https://github.com/BurntSushi/ripgrep;
  20. license = with licenses; [ unlicense /* or */ mit ];
  21. maintainers = [ maintainers.tailhook ];
  22. platforms = platforms.all;
  23. };
  24. }