diff --git a/pkgs/by-name/si/silver-searcher-ng/bash-completion.patch b/pkgs/by-name/si/silver-searcher-ng/bash-completion.patch new file mode 100644 index 000000000000..30e8c72389b7 --- /dev/null +++ b/pkgs/by-name/si/silver-searcher-ng/bash-completion.patch @@ -0,0 +1,5 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -9 +9 @@ +-bashcompdir = $(pkgdatadir)/completions ++bashcompdir = $(datadir)/bash-completion/completions diff --git a/pkgs/by-name/si/silver-searcher-ng/package.nix b/pkgs/by-name/si/silver-searcher-ng/package.nix new file mode 100644 index 000000000000..e0f76f7aad0a --- /dev/null +++ b/pkgs/by-name/si/silver-searcher-ng/package.nix @@ -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; + }; +}) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index b18b10e5fac1..ccfc72823133 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -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