summary refs log tree commit diff
path: root/pkgs/tools/networking/unbound
diff options
context:
space:
mode:
authorDaniel Nagy <danielnagy@posteo.de>2021-01-01 18:54:33 +0100
committertomberek <tomberek@users.noreply.github.com>2021-02-25 18:37:57 -0500
commita40f86e390a91ee2e2c189852c9571552f1ed5e9 (patch)
treea1d313e8cc78022927763e5b8753959d40dffcab /pkgs/tools/networking/unbound
parente7433051b6df73354abdf85c8b6e532311e75641 (diff)
downloadnixpkgs-a40f86e390a91ee2e2c189852c9571552f1ed5e9.tar
nixpkgs-a40f86e390a91ee2e2c189852c9571552f1ed5e9.tar.gz
nixpkgs-a40f86e390a91ee2e2c189852c9571552f1ed5e9.tar.bz2
nixpkgs-a40f86e390a91ee2e2c189852c9571552f1ed5e9.tar.lz
nixpkgs-a40f86e390a91ee2e2c189852c9571552f1ed5e9.tar.xz
nixpkgs-a40f86e390a91ee2e2c189852c9571552f1ed5e9.tar.zst
nixpkgs-a40f86e390a91ee2e2c189852c9571552f1ed5e9.zip
unbound: optionally support DNS-over-HTTPS
unbound can be used as a DNS-over-HTTPS (DoH) server.

This is a blog post introducing the feature:

https://www.nlnetlabs.nl/news/2020/Oct/08/unbound-1.12.0-released/
Diffstat (limited to 'pkgs/tools/networking/unbound')
-rw-r--r--pkgs/tools/networking/unbound/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix
index 24b17af3d3e..232e049e456 100644
--- a/pkgs/tools/networking/unbound/default.nix
+++ b/pkgs/tools/networking/unbound/default.nix
@@ -18,6 +18,9 @@
   #
 , withSystemd ? false
 , systemd ? null
+  # optionally support DNS-over-HTTPS as a server
+, withDoH ? false
+, libnghttp2
 }:
 
 stdenv.mkDerivation rec {
@@ -31,7 +34,9 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB
 
-  buildInputs = [ openssl nettle expat libevent ] ++ lib.optionals withSystemd [ pkg-config systemd ];
+  buildInputs = [ openssl nettle expat libevent ]
+    ++ lib.optionals withSystemd [ pkg-config systemd ]
+    ++ lib.optionals withDoH [ libnghttp2 ];
 
   configureFlags = [
     "--with-ssl=${openssl.dev}"
@@ -47,6 +52,8 @@ stdenv.mkDerivation rec {
     "--disable-flto"
   ] ++ lib.optionals withSystemd [
     "--enable-systemd"
+  ] ++ lib.optionals withDoH [
+    "--with-libnghttp2=${libnghttp2.dev}"
   ];
 
   installFlags = [ "configfile=\${out}/etc/unbound/unbound.conf" ];