about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text/grip-search/default.nix
blob: 921691a40afd8f974cc472728d6fc8c03b64f0f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchFromGitHub, boost, pkgconfig, cmake, catch2 }:

stdenv.mkDerivation rec {
  pname = "grip-search";
  version = "0.8";

  src = fetchFromGitHub {
    owner = "sc0ty";
    repo = "grip";
    rev = "v${version}";
    sha256 = "0bkqarylgzhis6fpj48qbifcd6a26cgnq8784hgnm707rq9kb0rx";
  };

  nativeBuildInputs = [ pkgconfig cmake catch2 ];

  doCheck = true;

  buildInputs = [ boost ];

  patchPhase = ''
    substituteInPlace src/general/config.h --replace "CUSTOM-BUILD" "${version}"
  '';

  meta = with stdenv.lib; {
    description = "Fast, indexed regexp search over large file trees";
    homepage = "https://github.com/sc0ty/grip";
    license = licenses.gpl3;
    platforms = platforms.all;
    maintainers = with maintainers; [ tex ];
  };
}