2016-07-01 11:44:07 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gnutls, jansson, liburcu, lmdb, libcap_ng, libidn
|
2017-08-16 06:24:05 +00:00
|
|
|
, systemd, nettle, libedit, zlib, libiconv, libintlOrEmpty
|
2017-01-30 10:55:15 +00:00
|
|
|
}:
|
2016-07-01 11:44:07 +00:00
|
|
|
|
2017-02-09 01:52:13 +00:00
|
|
|
let inherit (stdenv.lib) optional optionals; in
|
2017-02-13 23:47:01 +00:00
|
|
|
|
2016-07-01 11:44:07 +00:00
|
|
|
# Note: ATM only the libraries have been tested in nixpkgs.
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "knot-dns-${version}";
|
2017-07-28 13:12:07 +00:00
|
|
|
version = "2.5.3";
|
2016-07-01 11:44:07 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
|
2017-07-28 13:12:07 +00:00
|
|
|
sha256 = "d78ae231a68ace264f5738c8e57481923bcad7413f3f440c06fa6cc0aded9d8e";
|
2016-07-01 11:44:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "out" "dev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [
|
2017-02-13 23:47:01 +00:00
|
|
|
gnutls jansson liburcu libidn
|
2017-01-25 21:41:07 +00:00
|
|
|
nettle libedit
|
2017-01-30 15:09:45 +00:00
|
|
|
libiconv
|
2016-07-01 11:44:07 +00:00
|
|
|
# without sphinx &al. for developer documentation
|
2017-01-25 21:41:07 +00:00
|
|
|
]
|
2017-01-30 09:09:14 +00:00
|
|
|
# Use embedded lmdb there for now, as detection is broken on Darwin somehow.
|
2017-02-13 23:47:01 +00:00
|
|
|
++ optionals stdenv.isLinux [ libcap_ng systemd lmdb ]
|
2017-08-16 06:24:05 +00:00
|
|
|
++ libintlOrEmpty
|
2017-02-13 23:47:01 +00:00
|
|
|
++ optional stdenv.isDarwin zlib; # perhaps due to gnutls
|
2016-07-01 11:44:07 +00:00
|
|
|
|
2017-02-13 23:47:01 +00:00
|
|
|
# Not ideal but seems to work on Linux.
|
|
|
|
configureFlags = optional stdenv.isLinux "--with-lmdb=${stdenv.lib.getLib lmdb}";
|
2017-02-13 15:37:52 +00:00
|
|
|
|
2016-07-01 11:44:07 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-01-31 11:53:24 +00:00
|
|
|
CFLAGS = [ "-O2" "-DNDEBUG" ];
|
2016-07-01 11:44:07 +00:00
|
|
|
|
|
|
|
#doCheck = true; problems in combination with dynamic linking
|
|
|
|
|
|
|
|
postInstall = ''rm -r "$out"/var'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Authoritative-only DNS server from .cz domain registry";
|
|
|
|
homepage = https://knot-dns.cz;
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.vcunat ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|