about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/riemann-c-client/default.nix
blob: 7c744935064f689c5233493ec5fa4ecad4c29191 (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
42
43
{ lib, stdenv, fetchFromGitea, autoreconfHook, check, pkg-config, file, protobufc
,withWolfSSL ? false, wolfssl
,withGnuTLS ? false, gnutls
,withJSON ? true, json_c
}:

stdenv.mkDerivation rec {
  pname = "riemann-c-client";
  version = "2.1.1";

  src = fetchFromGitea {
    domain = "git.madhouse-project.org";
    owner = "algernon";
    repo = "riemann-c-client";
    rev = "riemann-c-client-${version}";
    hash = "sha256-FIhTT57g2uZBaH3EPNxNUNJn9n+0ZOhI6WMyF+xIr/Q=";
  };

  outputs = [ "bin" "dev" "out" ];

  nativeBuildInputs = [ autoreconfHook check pkg-config ];
  buildInputs = [ file protobufc ]
    ++ lib.optional withWolfSSL wolfssl
    ++ lib.optional withGnuTLS gnutls
    ++ lib.optional withJSON json_c
  ;

  configureFlags = []
    ++ lib.optional withWolfSSL "--with-tls=wolfssl"
    ++ lib.optional withGnuTLS "--with-tls=gnutls"
  ;

  doCheck = true;
  enableParallelBuilding = true;

  meta = with lib; {
    homepage = "https://git.madhouse-project.org/algernon/riemann-c-client";
    description = "A C client library for the Riemann monitoring system";
    license = licenses.lgpl3Plus;
    maintainers = with maintainers; [ pradeepchhetri ];
    platforms = platforms.linux;
  };
}