1 { lib, stdenv, fetchFromGitHub, cmake, gtest, c-ares, curl, libev }:
4 # https-dns-proxy supports HTTP3 if curl has support, but as of 2022-08 curl doesn't work with that enabled
5 # curl' = (curl.override { http3Support = true; });
9 stdenv.mkDerivation rec {
10 pname = "https-dns-proxy";
11 # there are no stable releases (yet?)
12 version = "unstable-2022-05-05";
14 src = fetchFromGitHub {
16 repo = "https_dns_proxy";
17 rev = "d310a378795790350703673388821558163944de";
18 hash = "sha256-On4SKUeltPhzM/x+K9aKciKBw5lmVySxnmLi2tnKr3Y=";
22 substituteInPlace https_dns_proxy.service.in \
23 --replace "\''${CMAKE_INSTALL_PREFIX}/" ""
24 substituteInPlace munin/https_dns_proxy.plugin \
25 --replace '--unit https_dns_proxy.service' '--unit https-dns-proxy.service'
28 nativeBuildInputs = [ cmake gtest ];
30 buildInputs = [ c-ares curl' libev ];
33 install -Dm444 -t $out/share/doc/${pname} ../{LICENSE,*.md}
34 install -Dm444 -t $out/share/${pname}/munin ../munin/*
35 # the systemd service definition is garbage, and we use our own with NixOS
36 mv $out/lib/systemd $out/share/${pname}
40 # upstream wants to add tests and the gtest framework is in place, so be ready
41 # for when that happens despite there being none as of right now
45 description = "DNS to DNS over HTTPS (DoH) proxy";
46 license = licenses.mit;
47 maintainers = with maintainers; [ peterhoeg ];
48 platforms = platforms.linux;
49 mainProgram = "https_dns_proxy";