2021-04-05 15:23:46 +00:00
|
|
|
{lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, pcre, zlib, xz}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "silver-searcher";
|
|
|
|
version = "2.2.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ggreer";
|
|
|
|
repo = "the_silver_searcher";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0cyazh7a66pgcabijd27xnk1alhsccywivv6yihw378dqxb22i1p";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./bash-completion.patch ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
NIX_LDFLAGS = lib.optionalString stdenv.isLinux "-lgcc_s";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2021-04-05 15:23:46 +00:00
|
|
|
buildInputs = [ pcre zlib xz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ggreer/the_silver_searcher/";
|
|
|
|
description = "A code-searching tool similar to ack, but faster";
|
|
|
|
maintainers = with maintainers; [ madjar ];
|
2021-09-18 10:52:07 +00:00
|
|
|
mainProgram = "ag";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|