summary refs log tree commit diff
path: root/pkgs/tools/text/ripgrep
diff options
context:
space:
mode:
authorTim Steinbach <NeQuissimus@users.noreply.github.com>2021-02-18 15:08:03 -0500
committerGitHub <noreply@github.com>2021-02-18 21:08:03 +0100
commita54275ba76f1436bcd2d1de49d3ed1f7c6bc94d7 (patch)
tree5b415b068fdd2aaae2420de38ac06aea089e4b1a /pkgs/tools/text/ripgrep
parent681e6e60a44cf66feb5060dd346c0f4a9ab342c4 (diff)
downloadnixpkgs-a54275ba76f1436bcd2d1de49d3ed1f7c6bc94d7.tar
nixpkgs-a54275ba76f1436bcd2d1de49d3ed1f7c6bc94d7.tar.gz
nixpkgs-a54275ba76f1436bcd2d1de49d3ed1f7c6bc94d7.tar.bz2
nixpkgs-a54275ba76f1436bcd2d1de49d3ed1f7c6bc94d7.tar.lz
nixpkgs-a54275ba76f1436bcd2d1de49d3ed1f7c6bc94d7.tar.xz
nixpkgs-a54275ba76f1436bcd2d1de49d3ed1f7c6bc94d7.tar.zst
nixpkgs-a54275ba76f1436bcd2d1de49d3ed1f7c6bc94d7.zip
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>
Diffstat (limited to 'pkgs/tools/text/ripgrep')
-rw-r--r--pkgs/tools/text/ripgrep/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/tools/text/ripgrep/default.nix b/pkgs/tools/text/ripgrep/default.nix
index 1d9f4aa4bdb..04f0cb59c03 100644
--- a/pkgs/tools/text/ripgrep/default.nix
+++ b/pkgs/tools/text/ripgrep/default.nix
@@ -37,6 +37,14 @@ rustPlatform.buildRustPackage rec {
     installShellCompletion --zsh complete/_rg
   '';
 
+  doInstallCheck = true;
+  installCheckPhase = ''
+    file="$(mktemp)"
+    echo "abc\nbcd\ncde" > "$file"
+    $out/bin/rg -N 'bcd' "$file"
+    $out/bin/rg -N 'cd' "$file"
+  '';
+
   meta = with lib; {
     description = "A utility that combines the usability of The Silver Searcher with the raw speed of grep";
     homepage = "https://github.com/BurntSushi/ripgrep";