nixpkgs/pkgs/tools/text/silver-searcher/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.2 KiB
Nix
Raw Normal View History

2021-03-14 19:12:53 +01:00
{lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, pcre, zlib, xz}:
2014-01-19 13:24:32 +01:00
2015-06-22 12:10:03 +02:00
stdenv.mkDerivation rec {
pname = "silver-searcher";
version = "2.2.0";
2014-01-19 13:24:32 +01:00
src = fetchFromGitHub {
owner = "ggreer";
repo = "the_silver_searcher";
2019-09-09 01:38:31 +02:00
rev = version;
sha256 = "0cyazh7a66pgcabijd27xnk1alhsccywivv6yihw378dqxb22i1p";
2014-01-19 13:24:32 +01:00
};
patches = [ ./bash-completion.patch ];
# 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
NIX_CFLAGS_COMPILE = "-fcommon";
2021-01-15 10:19:50 +01:00
NIX_LDFLAGS = lib.optionalString stdenv.isLinux "-lgcc_s";
nativeBuildInputs = [ autoreconfHook pkg-config ];
2021-03-14 19:12:53 +01:00
buildInputs = [ pcre zlib xz ];
2014-01-19 13:24:32 +01:00
meta = with lib; {
homepage = "https://github.com/ggreer/the_silver_searcher/";
2014-01-19 13:24:32 +01:00
description = "A code-searching tool similar to ack, but faster";
maintainers = with maintainers; [ madjar ];
2021-08-30 00:10:59 +02:00
mainProgram = "ag";
2015-06-22 08:25:07 +02:00
platforms = platforms.all;
license = licenses.asl20;
2014-01-19 13:24:32 +01:00
};
}