summary refs log tree commit diff
path: root/pkgs/tools/text/glogg/default.nix
blob: 306c25498ad3a9f550d9f67cc0c1c98ee06bf135 (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
32
33
34
35
36
37
38
39
40
41
{ mkDerivation, lib, stdenv, fetchFromGitHub, qmake, boost }:

mkDerivation rec {
  pname = "glogg";
  version = "1.1.4";

  src = fetchFromGitHub {
    owner = "nickbnf";
    repo = "glogg";
    rev = "v${version}";
    sha256 = "0hf1c2m8n88frmxmyn0ndr8129p7iky49nq565sw1asaydm5z6pb";
  };

  postPatch = lib.optionalString stdenv.isDarwin ''
    substituteInPlace glogg.pro \
      --replace "boost_program_options-mt" "boost_program_options"
  '';

  nativeBuildInputs = [ qmake ];
  buildInputs = [ boost ];

  qmakeFlags = [ "VERSION=${version}" ];

  postInstall = lib.optionalString stdenv.isDarwin ''
    mkdir -p $out/Applications
    mv $out/bin/glogg.app $out/Applications/glogg.app
    rm -fr $out/{bin,share}
    wrapQtApp $out/Applications/glogg.app/Contents/MacOS/glogg
  '';

  meta = with lib; {
    description = "The fast, smart log explorer";
    longDescription = ''
      A multi-platform GUI application to browse and search through long or complex log files. It is designed with programmers and system administrators in mind. glogg can be seen as a graphical, interactive combination of grep and less.
    '';
    homepage = "https://glogg.bonnefon.org/";
    license = licenses.gpl3Plus;
    platforms = platforms.unix;
    maintainers = with maintainers; [ c0bw3b ];
  };
}