From feee7e0357a74ab0510b2d113a3bdede1d509759 Mon Sep 17 00:00:00 2001 From: colin Date: Tue, 13 Dec 2022 01:37:50 +0000 Subject: [PATCH] trust-dns: init at 0.22.0 [trust-dns](https://github.com/bluejekyll/trust-dns/) is a Rust-based DNS client/server/resolver. the server uses .zone files that are largely compatible with bind. i've had a server deployed to `ns{1,2}.uninsane.org` for about a week using this derivation: seems to be stable enough for casual use. this package also ships a DNS client and a resolver. BIND also ships a dig-like client but lives in pkgs/servers/dns. so i'm replicating that convention. --- pkgs/servers/dns/trust-dns/default.nix | 33 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/servers/dns/trust-dns/default.nix diff --git a/pkgs/servers/dns/trust-dns/default.nix b/pkgs/servers/dns/trust-dns/default.nix new file mode 100644 index 000000000000..de21bdf252c1 --- /dev/null +++ b/pkgs/servers/dns/trust-dns/default.nix @@ -0,0 +1,33 @@ +{ lib +, fetchFromGitHub +, openssl +, pkg-config +, rustPlatform +}: + +rustPlatform.buildRustPackage rec { + pname = "trust-dns"; + version = "0.22.0"; + + src = fetchFromGitHub { + owner = "bluejekyll"; + repo = "trust-dns"; + rev = "v${version}"; + sha256 = "sha256-b9tK1JbTwB3ZuRPh0wb3cOFj9dMW7URXIaFzUq0Yipw="; + }; + cargoHash = "sha256-mpobdeTRWJzIEmhwtcM6UE66qRD5ot/0yLeQM6Tec+0="; + + buildInputs = [ openssl ]; + nativeBuildInputs = [ pkg-config ]; + + # tests expect internet connectivity to query real nameservers like 8.8.8.8 + doCheck = false; + + meta = with lib; { + description = "A Rust based DNS client, server, and resolver"; + homepage = "https://trust-dns.org/"; + maintainers = with maintainers; [ colinsane ]; + platforms = platforms.linux; + license = with licenses; [ asl20 mit ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8c5966cb7eb4..7907ca2a2e2e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26079,6 +26079,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; + trust-dns = callPackage ../servers/dns/trust-dns { }; + tunctl = callPackage ../os-specific/linux/tunctl { }; twa = callPackage ../tools/networking/twa { };