diff options
author | Poscat <poscat@mail.poscat.moe> | 2021-09-19 22:04:30 +0800 |
---|---|---|
committer | Poscat <poscat@mail.poscat.moe> | 2021-10-17 15:15:12 +0800 |
commit | 280e7b93bef612f74cb5110e3afad4f90818c717 (patch) | |
tree | 93f22a2a8079a3b0251bec3882297b88a7620eec /pkgs/tools | |
parent | 2cf9db0e3d45b9d00f16f2836cb1297bcadc475e (diff) |
unbound: enable more features
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/networking/unbound/default.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index a24ac1f388880..393756a9b2ab5 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -5,9 +5,13 @@ , nettle , expat , libevent +, libsodium +, protobufc +, hiredis , dns-root-data , pkg-config , makeWrapper +, symlinkJoin # # By default unbound will not be built with systemd support. Unbound is a very # commmon dependency. The transitive dependency closure of systemd also @@ -21,6 +25,11 @@ , systemd ? null # optionally support DNS-over-HTTPS as a server , withDoH ? false +, withECS ? false +, withDNSCrypt ? false +, withDNSTAP ? false +, withTFO ? false +, withRedis ? false , libnghttp2 }: @@ -57,8 +66,24 @@ stdenv.mkDerivation rec { "--enable-systemd" ] ++ lib.optionals withDoH [ "--with-libnghttp2=${libnghttp2.dev}" + ] ++ lib.optionals withECS [ + "--enable-subnet" + ] ++ lib.optionals withDNSCrypt [ + "--enable-dnscrypt" + "--with-libsodium=${symlinkJoin { name = "libsodium-full"; paths = [ libsodium.dev libsodium.out ]; }}" + ] ++ lib.optionals withDNSTAP [ + "--enable-dnstap" + "--with-protobuf-c=${protobufc}" + ] ++ lib.optionals withTFO [ + "--enable-tfo-client" + "--enable-tfo-server" + ] ++ lib.optionals withRedis [ + "--enable-cachedb" + "--with-libhiredis=${hiredis}" ]; + PROTOC_C = if withDNSTAP then "${protobufc}/bin/protoc-c" else null; + # Remove references to compile-time dependencies that are included in the configure flags postConfigure = let inherit (builtins) storeDir; |