Files
nixpkgs/pkgs/by-name/ht/https-dns-proxy/package.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

62 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
gtest,
c-ares,
curl,
libev,
}:
stdenv.mkDerivation rec {
pname = "https-dns-proxy";
# there are no stable releases (yet?)
version = "0-unstable-2024-11-18";
src = fetchFromGitHub {
owner = "aarond10";
repo = "https_dns_proxy";
rev = "484bd153bb85a51df1c5bede1b091be76537e0a7";
hash = "sha256-T4l3kQ2hPgmyKE7xzlkDDUD6AQi8dQPJQnw8NhUUhDY=";
};
postPatch = ''
substituteInPlace https_dns_proxy.service.in \
--replace "\''${CMAKE_INSTALL_PREFIX}/" ""
substituteInPlace munin/https_dns_proxy.plugin \
--replace '--unit https_dns_proxy.service' '--unit https-dns-proxy.service'
'';
nativeBuildInputs = [
cmake
gtest
];
buildInputs = [
c-ares
curl
libev
];
postInstall = ''
install -Dm444 -t $out/share/doc/${pname} ../{LICENSE,*.md}
install -Dm444 -t $out/share/${pname}/munin ../munin/*
# the systemd service definition is garbage, and we use our own with NixOS
mv $out/lib/systemd $out/share/${pname}
rmdir $out/lib
'';
# 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;
meta = {
description = "DNS to DNS over HTTPS (DoH) proxy";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ peterhoeg ];
platforms = lib.platforms.linux;
mainProgram = "https_dns_proxy";
};
}