2021-03-14 18:12:53 +00:00
|
|
|
{lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, pcre, zlib, xz}:
|
2014-01-19 12:24:32 +00:00
|
|
|
|
2015-06-22 10:10:03 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "silver-searcher";
|
2018-08-07 14:06:49 +00:00
|
|
|
version = "2.2.0";
|
2014-01-19 12:24:32 +00:00
|
|
|
|
2015-06-22 14:19:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ggreer";
|
|
|
|
repo = "the_silver_searcher";
|
2019-09-08 23:38:31 +00:00
|
|
|
rev = version;
|
2018-08-07 14:06:49 +00:00
|
|
|
sha256 = "0cyazh7a66pgcabijd27xnk1alhsccywivv6yihw378dqxb22i1p";
|
2014-01-19 12:24:32 +00:00
|
|
|
};
|
|
|
|
|
2017-11-20 09:14:36 +00:00
|
|
|
patches = [ ./bash-completion.patch ];
|
|
|
|
|
2022-05-29 06:43:10 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: src/zfile.o:/build/source/src/log.h:12: multiple definition of
|
|
|
|
# `print_mtx'; src/ignore.o:/build/source/src/log.h:12: first defined here
|
|
|
|
# TODO: remove once next release has https://github.com/ggreer/the_silver_searcher/pull/1377
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2021-01-15 09:19:50 +00:00
|
|
|
NIX_LDFLAGS = lib.optionalString stdenv.isLinux "-lgcc_s";
|
2014-02-03 16:41:25 +00:00
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2021-03-14 18:12:53 +00:00
|
|
|
buildInputs = [ pcre zlib xz ];
|
2014-01-19 12:24:32 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/ggreer/the_silver_searcher/";
|
2014-01-19 12:24:32 +00:00
|
|
|
description = "A code-searching tool similar to ack, but faster";
|
2019-03-12 22:45:33 +00:00
|
|
|
maintainers = with maintainers; [ madjar ];
|
2021-08-29 22:10:59 +00:00
|
|
|
mainProgram = "ag";
|
2015-06-22 06:25:07 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.asl20;
|
2014-01-19 12:24:32 +00:00
|
|
|
};
|
|
|
|
}
|