2018-07-20 13:37:49 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gnutls, liburcu, lmdb, libcap_ng, libidn2, libunistring
|
2018-03-14 19:15:06 +00:00
|
|
|
, systemd, nettle, libedit, zlib, libiconv, libintl
|
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}";
|
2019-01-23 13:03:24 +00:00
|
|
|
version = "2.7.6";
|
2016-07-01 11:44:07 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 18:43:35 +00:00
|
|
|
url = "https://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
|
2019-01-23 13:03:24 +00:00
|
|
|
sha256 = "a1cb1877f04f7c2549c977c2658cfafd07c7e0e924f8e8aa8d4ae4b707f697a2";
|
2016-07-01 11:44:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "out" "dev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [
|
2018-07-20 13:37:49 +00:00
|
|
|
gnutls liburcu libidn2 libunistring
|
2017-01-25 21:41:07 +00:00
|
|
|
nettle libedit
|
2018-03-14 19:15:06 +00:00
|
|
|
libiconv lmdb libintl
|
2016-07-01 11:44:07 +00:00
|
|
|
# without sphinx &al. for developer documentation
|
2017-01-25 21:41:07 +00:00
|
|
|
]
|
2017-09-23 12:14:13 +00:00
|
|
|
++ optionals stdenv.isLinux [ libcap_ng systemd ]
|
2017-02-13 23:47:01 +00:00
|
|
|
++ optional stdenv.isDarwin zlib; # perhaps due to gnutls
|
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
|
|
|
|
2018-08-09 23:59:27 +00:00
|
|
|
doCheck = true;
|
|
|
|
doInstallCheck = false; # needs pykeymgr?
|
2016-07-01 11:44:07 +00:00
|
|
|
|
2018-04-24 15:01:29 +00:00
|
|
|
postInstall = ''rm -r "$out"/var "$out"/lib/*.la'';
|
2016-07-01 11:44:07 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|