@@ -0,0 +1,39 @@
1+{ stdenv, fetchurl, pkgconfig, gnutls, jansson, liburcu, lmdb, libcap_ng, libidn
2+, systemd, nettle, libedit }:
3+
4+# Note: ATM only the libraries have been tested in nixpkgs.
5+stdenv.mkDerivation rec {
6+ name = "knot-dns-${version}";
7+ version = "2.3.3";
8+
9+ src = fetchurl {
10+ url = "http://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
11+ sha256 = "a929bce3b957a81776b1db7b43b0e4473339bf16be8dbba5abb4b0593bf43c94";
12+ };
13+
14+ outputs = [ "bin" "out" "dev" ];
15+
16+ nativeBuildInputs = [ pkgconfig ];
17+ buildInputs = [
18+ gnutls jansson liburcu lmdb libcap_ng libidn
19+ systemd nettle libedit
20+ # without sphinx &al. for developer documentation
21+ ];
22+
23+ enableParallelBuilding = true;
24+
25+ CFLAGS = [ "-DNDEBUG" ];
26+
27+ #doCheck = true; problems in combination with dynamic linking
28+
29+ postInstall = ''rm -r "$out"/var'';
30+
31+ meta = with stdenv.lib; {
32+ description = "Authoritative-only DNS server from .cz domain registry";
33+ homepage = https://knot-dns.cz;
34+ license = licenses.gpl3Plus;
35+ platforms = platforms.unix;
36+ maintainers = [ maintainers.vcunat ];
37+ };
38+}
39+