summary refs log tree commit diff
path: root/pkgs/tools/networking/kea/default.nix
blob: e3e4a67c131fc31a2b6b4630981fd1f945c20478 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{ stdenv
, lib
, fetchurl
, autoreconfHook
, pkg-config
, boost
, botan2
, libmysqlclient
, log4cplus
, postgresql
, python3
, nixosTests
}:

stdenv.mkDerivation rec {
  pname = "kea";
  version = "1.9.9";

  src = fetchurl {
    url = "https://ftp.isc.org/isc/${pname}/${version}/${pname}-${version}.tar.gz";
    sha256 = "sha256-iVSWBR1+SkXlkwMii2PXpcxFSXYigz4lfNnMZBvS2kM=";
  };

  patches = [ ./dont-create-var.patch ];

  postPatch = ''
    substituteInPlace ./src/bin/keactrl/Makefile.am --replace '@sysconfdir@' "$out/etc"
  '';

  configureFlags = [
    "--enable-perfdhcp"
    "--enable-shell"
    "--localstatedir=/var"
    "--with-mysql=${lib.getDev libmysqlclient}/bin/mysql_config"
    "--with-pgsql=${postgresql}/bin/pg_config"
  ];

  nativeBuildInputs = [
    autoreconfHook
    pkg-config
  ];

  buildInputs = [
    boost
    botan2
    libmysqlclient
    log4cplus
    python3
  ];

  enableParallelBuilding = true;

  passthru.tests = {
    inherit (nixosTests) kea;
  };

  meta = with lib; {
    homepage = "https://kea.isc.org/";
    description = "High-performance, extensible DHCP server by ISC";
    longDescription = ''
      Kea is a new open source DHCPv4/DHCPv6 server being developed by
      Internet Systems Consortium. The objective of this project is to
      provide a very high-performance, extensible DHCP server engine for
      use by enterprises and service providers, either as is or with
      extensions and modifications.
    '';
    license = licenses.mpl20;
    platforms = platforms.unix;
    maintainers = with maintainers; [ fpletz hexa ];
  };
}