ripgrep: fix cross build Linux to FreeBSD (#544331)

This commit is contained in:
zowoq
2026-07-21 22:38:18 +00:00
committed by GitHub
+11 -9
View File
@@ -50,15 +50,17 @@ rustPlatform.buildRustPackage (finalAttrs: {
'';
doInstallCheck = true;
installCheckPhase = ''
file="$(mktemp)"
echo "abc\nbcd\ncde" > "$file"
${rg} -N 'bcd' "$file"
${rg} -N 'cd' "$file"
''
+ lib.optionalString withPCRE2 ''
echo '(a(aa)aa)' | ${rg} -P '\((a*|(?R))*\)'
'';
installCheckPhase = lib.optionalString canRunRg (
''
file="$(mktemp)"
echo "abc\nbcd\ncde" > "$file"
${rg} -N 'bcd' "$file"
${rg} -N 'cd' "$file"
''
+ lib.optionalString withPCRE2 ''
echo '(a(aa)aa)' | ${rg} -P '\((a*|(?R))*\)'
''
);
meta = {
description = "Utility that combines the usability of The Silver Searcher with the raw speed of grep";