ripgrep: Add installCheckPhase (#113621)
* ripgrep: Add installCheckPhase
Convert test removed in dd63561bcbe5f7b86063c7c6e80fca5af487d801
to an installCheckPhase
* Update pkgs/tools/text/ripgrep/default.nix
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
commita54275ba76f1436bcd2d1de49d3ed1f7c6bc94d7
authorTim Steinbach <NeQuissimus@users.noreply.github.com>
dateThu 18 Feb 2021, 15:08 (6 years ago)
parent681e6e6
pkgs/tools/text/ripgrep/default.nix+8
@@ -37,6 +37,14 @@ rustPlatform.buildRustPackage rec {
3737 installShellCompletion --zsh complete/_rg
3838 '';
3939
40+ doInstallCheck = true;
41+ installCheckPhase = ''
42+ file="$(mktemp)"
43+ echo "abc\nbcd\ncde" > "$file"
44+ $out/bin/rg -N 'bcd' "$file"
45+ $out/bin/rg -N 'cd' "$file"
46+ '';
47+
4048 meta = with lib; {
4149 description = "A utility that combines the usability of The Silver Searcher with the raw speed of grep";
4250 homepage = "https://github.com/BurntSushi/ripgrep";