mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
d09738dd90
Upgrade should be pretty easy: https://www.knot-dns.cz/docs/3.0/html/migration.html#upgrade-2-9-x-to-3-0-x https://en.blog.nic.cz/2020/09/09/knot-dns-3-0-news/ https://gitlab.nic.cz/knot/knot-dns/-/tags/v3.0.0 For now, it's built with XDP support but the NixOS service isn't ready for that yet. I'll try to look at that sometime later.
65 lines
1.7 KiB
Nix
65 lines
1.7 KiB
Nix
{ stdenv, fetchurl, pkgconfig, gnutls, liburcu, lmdb, libcap_ng, libidn2, libunistring
|
|
, systemd, nettle, libedit, zlib, libiconv, libintl, libmaxminddb, libbpf, nghttp2
|
|
, autoreconfHook
|
|
}:
|
|
|
|
let inherit (stdenv.lib) optional optionals; in
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "knot-dns";
|
|
version = "3.0.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
|
|
sha256 = "f1c96aff6e873a2f9b1b8c2441d5a7801dd48d3abdb738a4d24b26c2a8fbe6c4";
|
|
};
|
|
|
|
outputs = [ "bin" "out" "dev" ];
|
|
|
|
configureFlags = [
|
|
"--with-configdir=/etc/knot"
|
|
"--with-rundir=/run/knot"
|
|
"--with-storage=/var/lib/knot"
|
|
];
|
|
|
|
patches = [
|
|
# Don't try to create directories like /var/lib/knot at build time.
|
|
# They are later created from NixOS itself.
|
|
./dont-create-run-time-dirs.patch
|
|
./runtime-deps.patch
|
|
];
|
|
|
|
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
|
buildInputs = [
|
|
gnutls liburcu libidn2 libunistring
|
|
nettle libedit
|
|
libiconv lmdb libintl
|
|
libbpf # XDP support
|
|
nghttp2 # DoH support in kdig
|
|
libmaxminddb # optional for geoip module (it's tiny)
|
|
# without sphinx &al. for developer documentation
|
|
# TODO: add dnstap support?
|
|
]
|
|
++ optionals stdenv.isLinux [ libcap_ng systemd ]
|
|
++ optional stdenv.isDarwin zlib; # perhaps due to gnutls
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
CFLAGS = [ "-O2" "-DNDEBUG" ];
|
|
|
|
doCheck = true;
|
|
doInstallCheck = false; # needs pykeymgr?
|
|
|
|
postInstall = ''
|
|
rm -r "$out"/lib/*.la
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|