2021-12-26 17:43:05 +00:00
|
|
|
# Getdns and Stubby are released together, see https://getdnsapi.net/releases/
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
{ lib, stdenv, fetchurl, cmake, darwin, doxygen, libidn2, libyaml, openssl
|
|
|
|
, systemd, unbound, yq }:
|
|
|
|
let
|
|
|
|
metaCommon = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ leenaars ehmry ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2021-12-26 17:43:05 +00:00
|
|
|
in rec {
|
|
|
|
|
|
|
|
getdns = stdenv.mkDerivation rec {
|
|
|
|
pname = "getdns";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "1.7.2";
|
2021-12-26 17:43:05 +00:00
|
|
|
outputs = [ "out" "dev" "lib" "man" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://getdnsapi.net/releases/${pname}-${
|
|
|
|
with builtins;
|
|
|
|
concatStringsSep "-" (splitVersion version)
|
|
|
|
}/${pname}-${version}.tar.gz";
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 =
|
|
|
|
# upstream publishes hashes in hex format
|
|
|
|
"db89fd2a940000e03ecf48d0232b4532e5f0602e80b592be406fd57ad76fdd17";
|
2021-12-26 17:43:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake doxygen ];
|
|
|
|
|
|
|
|
buildInputs = [ libidn2 openssl unbound ];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://github.com/getdnsapi/getdns/issues/517
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace getdns.pc.in \
|
|
|
|
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
|
|
'';
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
postInstall = "rm -r $out/share/doc";
|
|
|
|
|
|
|
|
meta = with lib;
|
|
|
|
metaCommon // {
|
|
|
|
description = "A modern asynchronous DNS API";
|
|
|
|
longDescription = ''
|
|
|
|
getdns is an implementation of a modern asynchronous DNS API; the
|
|
|
|
specification was originally edited by Paul Hoffman. It is intended to make all
|
|
|
|
types of DNS information easily available to application developers and non-DNS
|
|
|
|
experts. DNSSEC offers a unique global infrastructure for establishing and
|
|
|
|
enhancing cryptographic trust relations. With the development of this API the
|
|
|
|
developers intend to offer application developers a modern and flexible
|
|
|
|
interface that enables end-to-end trust in the DNS architecture, and which will
|
|
|
|
inspire application developers to implement innovative security solutions in
|
|
|
|
their applications.
|
|
|
|
'';
|
|
|
|
homepage = "https://getdnsapi.net";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
stubby = stdenv.mkDerivation rec {
|
|
|
|
pname = "stubby";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "0.4.2";
|
2021-12-26 17:43:05 +00:00
|
|
|
outputs = [ "out" "man" "stubbyExampleJson" ];
|
|
|
|
|
|
|
|
inherit (getdns) src;
|
|
|
|
sourceRoot = "${getdns.name}/stubby";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake doxygen yq ];
|
|
|
|
|
|
|
|
buildInputs = [ getdns libyaml openssl systemd ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ darwin.Security ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm -r $out/share/doc
|
|
|
|
yq \
|
|
|
|
< $NIX_BUILD_TOP/$sourceRoot/stubby.yml.example \
|
|
|
|
> $stubbyExampleJson
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.settingsExample = with builtins;
|
|
|
|
fromJSON (readFile stubby.stubbyExampleJson);
|
|
|
|
|
|
|
|
meta = with lib;
|
|
|
|
metaCommon // {
|
|
|
|
description = "A local DNS Privacy stub resolver (using DNS-over-TLS)";
|
|
|
|
longDescription = ''
|
|
|
|
Stubby is an application that acts as a local DNS Privacy stub
|
|
|
|
resolver (using RFC 7858, aka DNS-over-TLS). Stubby encrypts DNS
|
|
|
|
queries sent from a client machine (desktop or laptop) to a DNS
|
|
|
|
Privacy resolver increasing end user privacy. Stubby is developed by
|
|
|
|
the getdns team.
|
|
|
|
'';
|
|
|
|
homepage = "https://dnsprivacy.org/wiki/x/JYAT";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|