silver-searcher-ng: Bring back silver-searcher with PCRE2 support (#530882)

This commit is contained in:
oddlama
2026-06-16 20:35:14 +02:00
committed by GitHub
3 changed files with 72 additions and 1 deletions
@@ -0,0 +1,5 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -9 +9 @@
-bashcompdir = $(pkgdatadir)/completions
+bashcompdir = $(datadir)/bash-completion/completions
@@ -0,0 +1,66 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
git,
pkg-config,
pcre2,
python3Packages,
zlib,
xz,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "silver-searcher-ng";
version = "3.0.0";
src = fetchFromGitHub {
owner = "silver-searcher";
repo = "silver-searcher-ng";
rev = finalAttrs.version;
hash = "sha256-IiVFbS9XGmqcGN4NRXFC07cV6bGKDs9C2y5XxJKdvFk=";
};
patches = [ ./bash-completion.patch ];
env = lib.optionalAttrs stdenv.hostPlatform.isLinux {
NIX_LDFLAGS = "-lgcc_s";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
pcre2
zlib
xz
];
doCheck = true;
nativeCheckInputs = [
python3Packages.cram
git
];
checkPhase = ''
runHook preCheck
make test
runHook postCheck
'';
strictDeps = true;
__structuredAttrs = true;
meta = {
homepage = "https://github.com/silver-searcher/silver-searcher-ng";
description = "Code-searching tool similar to ack, but faster";
maintainers = with lib.maintainers; [ timschumi ];
mainProgram = "ag";
platforms = lib.platforms.all;
license = lib.licenses.asl20;
};
})
+1 -1
View File
@@ -2016,7 +2016,7 @@ mapAliases {
sierra-breeze-enhanced = throw "'sierra-breeze-enhanced' has been removed, as it is only compatible with Plasma 5, which is EOL"; # Added 2025-08-20
signal-desktop-bin = throw "'signal-desktop-bin' has been replaced by 'signal-desktop' which is built from source"; # Added 2026-03-02
signal-desktop-source = throw "'signal-desktop-source' has been renamed to/replaced by 'signal-desktop'"; # Converted to throw 2025-10-27
silver-searcher = throw "'silver-searcher' has been removed as it has seen no development since 2020 and is stuck on the obsolete pcre library";
silver-searcher = throw "'silver-searcher' has been removed as it has seen no development since 2020 and is stuck on the obsolete pcre library. Consider using 'silver-searcher-ng', which is a fork with support for PCRE2.";
simpleBluez = warnAlias "'simpleBluez' has been renamed to 'simplebluez'" simplebluez; # Added 2026-02-18
simpleDBus = warnAlias "'simpleDBus' has been renamed to 'simpledbus'" simpledbus; # Added 2026-02-12
simplesamlphp = throw "'simplesamlphp' was removed because it was unmaintained in nixpkgs"; # Added 2025-10-17