knot-resolver: 1.3.3 -> 1.4.0
Also drop rarely used dependencies, by default, and utilize root server addresses from nixpkgs.
This commit is contained in:
parent
4e12dbb092
commit
fd56648a04
@ -1,20 +1,20 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, hexdump, which
|
{ stdenv, fetchurl, pkgconfig, hexdump, which
|
||||||
, knot-dns, luajit, libuv, lmdb
|
, knot-dns, luajit, libuv, lmdb, gnutls, nettle
|
||||||
, cmocka, systemd, hiredis, libmemcached
|
, cmocka, systemd, dns-root-data, makeWrapper
|
||||||
, gnutls, nettle
|
, extraFeatures ? false /* catch-all if defaults aren't enough */
|
||||||
, luajitPackages, makeWrapper
|
, hiredis, libmemcached, luajitPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (stdenv.lib) optional;
|
inherit (stdenv.lib) optional optionals optionalString;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "knot-resolver-${version}";
|
name = "knot-resolver-${version}";
|
||||||
version = "1.3.3";
|
version = "1.4.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://secure.nic.cz/files/knot-resolver/${name}.tar.xz";
|
url = "http://secure.nic.cz/files/knot-resolver/${name}.tar.xz";
|
||||||
sha256 = "c679238bea5744de8a99f4402a61e9e58502bc42b40ecfa370e53679ed5d5b80";
|
sha256 = "ac19c121fd687c7e4f5f907b46932d26f8f9d9e01626c4dadb3847e25ea31ceb";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
@ -23,18 +23,17 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig which makeWrapper hexdump ];
|
nativeBuildInputs = [ pkgconfig which makeWrapper hexdump ];
|
||||||
|
|
||||||
buildInputs = [ knot-dns luajit libuv gnutls ]
|
|
||||||
++ optional stdenv.isLinux lmdb # system lmdb causes some problems on Darwin
|
|
||||||
## optional dependencies; TODO: libedit, dnstap?
|
|
||||||
++ optional doInstallCheck cmocka
|
|
||||||
++ optional stdenv.isLinux systemd # socket activation
|
|
||||||
++ [
|
|
||||||
nettle # DNS cookies
|
|
||||||
hiredis libmemcached # additional cache backends
|
|
||||||
# http://knot-resolver.readthedocs.io/en/latest/build.html#requirements
|
# http://knot-resolver.readthedocs.io/en/latest/build.html#requirements
|
||||||
|
buildInputs = [ knot-dns luajit libuv gnutls nettle ]
|
||||||
|
++ optional stdenv.isLinux lmdb # system lmdb causes some problems on Darwin
|
||||||
|
++ optional doInstallCheck cmocka
|
||||||
|
++ optional stdenv.isLinux systemd # sd_notify
|
||||||
|
++ optionals extraFeatures [
|
||||||
|
hiredis libmemcached # additional cache backends
|
||||||
];
|
];
|
||||||
|
## optional dependencies; TODO: libedit, dnstap, http2 module?
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=$(out)" ];
|
makeFlags = [ "PREFIX=$(out)" "ROOTHINTS=${dns-root-data}/root.hints" ];
|
||||||
CFLAGS = [ "-O2" "-DNDEBUG" ];
|
CFLAGS = [ "-O2" "-DNDEBUG" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
@ -45,8 +44,11 @@ stdenv.mkDerivation rec {
|
|||||||
export LD_LIBRARY_PATH="$out/lib"
|
export LD_LIBRARY_PATH="$out/lib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
rm "$out"/etc/kresd/root.hints # using system-wide instead
|
||||||
|
''
|
||||||
# optional: to allow auto-bootstrapping root trust anchor via https
|
# optional: to allow auto-bootstrapping root trust anchor via https
|
||||||
postInstall = with luajitPackages; ''
|
+ (with luajitPackages; ''
|
||||||
wrapProgram "$out/sbin/kresd" \
|
wrapProgram "$out/sbin/kresd" \
|
||||||
--set LUA_PATH '${
|
--set LUA_PATH '${
|
||||||
stdenv.lib.concatStringsSep ";"
|
stdenv.lib.concatStringsSep ";"
|
||||||
@ -56,7 +58,7 @@ stdenv.mkDerivation rec {
|
|||||||
stdenv.lib.concatStringsSep ";"
|
stdenv.lib.concatStringsSep ";"
|
||||||
(map getLuaCPath [ luasec luasocket ])
|
(map getLuaCPath [ luasec luasocket ])
|
||||||
}'
|
}'
|
||||||
'';
|
'');
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Caching validating DNS resolver, from .cz domain registry";
|
description = "Caching validating DNS resolver, from .cz domain registry";
|
||||||
|
Loading…
Reference in New Issue
Block a user