2017-11-13 12:44:40 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gnutls, liburcu, lmdb, libcap_ng, libidn
|
2017-08-16 08:24:05 +02:00
|
|
|
, systemd, nettle, libedit, zlib, libiconv, libintlOrEmpty
|
2017-01-30 11:55:15 +01:00
|
|
|
}:
|
2016-07-01 13:44:07 +02:00
|
|
|
|
2017-02-09 02:52:13 +01:00
|
|
|
let inherit (stdenv.lib) optional optionals; in
|
2017-02-14 00:47:01 +01:00
|
|
|
|
2016-07-01 13:44:07 +02:00
|
|
|
# Note: ATM only the libraries have been tested in nixpkgs.
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "knot-dns-${version}";
|
2018-02-02 13:15:20 +01:00
|
|
|
version = "2.6.4";
|
2016-07-01 13:44:07 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
|
2018-02-02 13:15:20 +01:00
|
|
|
sha256 = "1d0d37b5047ecd554d927519d5565c29c1ba9b501c100eb5f3a5af184d75386a";
|
2016-07-01 13:44:07 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "out" "dev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [
|
2017-11-13 12:44:40 +01:00
|
|
|
gnutls liburcu libidn
|
2017-01-25 22:41:07 +01:00
|
|
|
nettle libedit
|
2017-09-23 14:14:13 +02:00
|
|
|
libiconv lmdb
|
2016-07-01 13:44:07 +02:00
|
|
|
# without sphinx &al. for developer documentation
|
2017-01-25 22:41:07 +01:00
|
|
|
]
|
2017-09-23 14:14:13 +02:00
|
|
|
++ optionals stdenv.isLinux [ libcap_ng systemd ]
|
2017-08-16 08:24:05 +02:00
|
|
|
++ libintlOrEmpty
|
2017-02-14 00:47:01 +01:00
|
|
|
++ optional stdenv.isDarwin zlib; # perhaps due to gnutls
|
2016-07-01 13:44:07 +02:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-01-31 12:53:24 +01:00
|
|
|
CFLAGS = [ "-O2" "-DNDEBUG" ];
|
2016-07-01 13:44:07 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|