1{ stdenv, lib, fetchurl }:
2
3let
4
5 rootHints = fetchurl {
6 # Original source https://www.internic.net/domain/named.root
7 # occasionally suffers from pointless hash changes,
8 # and having stable sources for older versions has advantages, too.
9 urls = map (prefix: prefix + "cc5e14a264912/etc/root.hints") [
10 "https://gitlab.nic.cz/knot/knot-resolver/raw/"
11 "https://raw.githubusercontent.com/CZ-NIC/knot-resolver/"
12 ];
13 sha256 = "0vdrff4l8s8grif52dnh091s8qydhh88k25zqd9rj66sf1qwcwxl";
14 };
15
16 rootKey = ./root.key;
17 rootDs = ./root.ds;
18
19in
20
21stdenv.mkDerivation {
22 name = "dns-root-data-2019-01-11";
23
24 buildCommand = ''
25 mkdir $out
26 cp ${rootHints} $out/root.hints
27 cp ${rootKey} $out/root.key
28 cp ${rootDs} $out/root.ds
29 '';
30
31 meta = with lib; {
32 description = "DNS root data including root zone and DNSSEC key";
33 maintainers = with maintainers; [ fpletz vcunat ];
34 };
35}