1 # Getdns and Stubby are released together, see https://getdnsapi.net/releases/
3 { lib, stdenv, fetchurl, cmake, darwin, doxygen, libidn2, libyaml, openssl
4 , systemd, unbound, yq }:
6 metaCommon = with lib; {
7 maintainers = with maintainers; [ leenaars ehmry ];
8 license = licenses.bsd3;
9 platforms = platforms.all;
13 getdns = stdenv.mkDerivation rec {
16 outputs = [ "out" "dev" "lib" "man" ];
19 url = "https://getdnsapi.net/releases/${pname}-${
21 concatStringsSep "-" (splitVersion version)
22 }/${pname}-${version}.tar.gz";
24 # upstream publishes hashes in hex format
25 "db89fd2a940000e03ecf48d0232b4532e5f0602e80b592be406fd57ad76fdd17";
28 nativeBuildInputs = [ cmake doxygen ];
30 buildInputs = [ libidn2 openssl unbound ];
32 # https://github.com/getdnsapi/getdns/issues/517
34 substituteInPlace getdns.pc.in \
35 --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
36 --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
39 postInstall = "rm -r $out/share/doc";
43 description = "A modern asynchronous DNS API";
45 getdns is an implementation of a modern asynchronous DNS API; the
46 specification was originally edited by Paul Hoffman. It is intended to make all
47 types of DNS information easily available to application developers and non-DNS
48 experts. DNSSEC offers a unique global infrastructure for establishing and
49 enhancing cryptographic trust relations. With the development of this API the
50 developers intend to offer application developers a modern and flexible
51 interface that enables end-to-end trust in the DNS architecture, and which will
52 inspire application developers to implement innovative security solutions in
55 homepage = "https://getdnsapi.net";
59 stubby = stdenv.mkDerivation rec {
62 outputs = [ "out" "man" "stubbyExampleJson" ];
65 sourceRoot = "${getdns.name}/stubby";
67 nativeBuildInputs = [ cmake doxygen yq ];
69 buildInputs = [ getdns libyaml openssl systemd ]
70 ++ lib.optionals stdenv.isDarwin [ darwin.Security ];
75 < $NIX_BUILD_TOP/$sourceRoot/stubby.yml.example \
79 passthru.settingsExample = with builtins;
80 fromJSON (readFile stubby.stubbyExampleJson);
84 description = "A local DNS Privacy stub resolver (using DNS-over-TLS)";
86 Stubby is an application that acts as a local DNS Privacy stub
87 resolver (using RFC 7858, aka DNS-over-TLS). Stubby encrypts DNS
88 queries sent from a client machine (desktop or laptop) to a DNS
89 Privacy resolver increasing end user privacy. Stubby is developed by
92 homepage = "https://dnsprivacy.org/wiki/x/JYAT";