1 { lib, stdenv, fetchurl, glibc, dns-root-data, nixosTests } :
7 url = "http://smarden.org/pape/djb/manpages/djbdns-${version}-man-20031023.tar.gz";
8 sha256 = "0sg51gjy6j1hnrra406q1qhf5kvk1m00y8qqhs6r0a699gqmh75s";
18 url = "https://cr.yp.to/djbdns/djbdns-${version}.tar.gz";
19 sha256 = "0j3baf92vkczr5fxww7rp1b7gmczxmmgrqc8w2dy7kgk09m85k9w";
24 ./fix-nix-usernamespace-build.patch
26 # To fix https://github.com/NixOS/nixpkgs/issues/119066.
27 # Note that the NixOS test <nixpkgs/nixos/tests/tinydns.nix> tests for this.
32 echo gcc -O2 -include ${glibc.dev}/include/errno.h > conf-cc
34 # djbdns ships with an outdated list of root servers
35 awk '/^.?.ROOT-SERVERS.NET/ { print $4 }' ${dns-root-data}/root.hints > dnsroots.global
36 sed -i "s|/etc/dnsroots.global|$out/etc/dnsroots.global|" dnscache-conf.c
46 mv -iv djbdns-man/*.$n man/man$n;
52 tinydns = nixosTests.tinydns;
56 description = "A collection of Domain Name System tools";
57 longDescription = "Includes software for all the fundamental DNS operations: DNS cache: finding addresses of Internet hosts; DNS server: publishing addresses of Internet hosts; and DNS client: talking to a DNS cache.";
58 homepage = "https://cr.yp.to/djbdns.html";
59 license = licenses.publicDomain;
60 maintainers = with maintainers; [ jerith666 ];