2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, gtest, c-ares, curl, libev }:
|
2020-02-27 10:19:40 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "https-dns-proxy";
|
|
|
|
# there are no stable releases (yet?)
|
2021-04-06 07:46:10 +02:00
|
|
|
version = "unstable-2021-03-29";
|
2020-02-27 10:19:40 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aarond10";
|
|
|
|
repo = "https_dns_proxy";
|
2021-04-06 07:46:10 +02:00
|
|
|
rev = "bbd9ef272dcda3ead515871f594768af13192af7";
|
|
|
|
sha256 = "sha256-r+IpDklI3vITK8ZlZvIFm3JdDe2r8DK2ND3n1a/ThrM=";
|
2020-02-27 10:19:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake gtest ];
|
|
|
|
|
|
|
|
buildInputs = [ c-ares curl libev ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm555 -t $out/bin https_dns_proxy
|
|
|
|
install -Dm444 -t $out/share/doc/${pname} ../{LICENSE,README}.*
|
|
|
|
'';
|
|
|
|
|
|
|
|
# upstream wants to add tests and the gtest framework is in place, so be ready
|
|
|
|
# for when that happens despite there being none as of right now
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-02-27 10:19:40 +01:00
|
|
|
description = "DNS to DNS over HTTPS (DoH) proxy";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|