2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchurl }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
rootHints = fetchurl {
|
|
|
|
# Original source https://www.internic.net/domain/named.root
|
|
|
|
# occasionally suffers from pointless hash changes,
|
|
|
|
# and having stable sources for older versions has advantages, too.
|
2024-01-02 11:29:13 +00:00
|
|
|
urls = map (prefix: prefix + "d9c96ae96f066a85d7/etc/root.hints") [
|
2020-07-18 16:06:22 +00:00
|
|
|
"https://gitlab.nic.cz/knot/knot-resolver/raw/"
|
2020-04-24 23:36:52 +00:00
|
|
|
"https://raw.githubusercontent.com/CZ-NIC/knot-resolver/"
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-4lG/uPnNHBNIZ/XIeDM1w3iukrpeW0JIjTnGSwkJ8U4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
rootKey = ./root.key;
|
|
|
|
rootDs = ./root.ds;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2022-04-27 09:35:20 +00:00
|
|
|
pname = "dns-root-data";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2023-11-27";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir $out
|
|
|
|
cp ${rootHints} $out/root.hints
|
|
|
|
cp ${rootKey} $out/root.key
|
|
|
|
cp ${rootDs} $out/root.ds
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "DNS root data including root zone and DNSSEC key";
|
|
|
|
maintainers = with maintainers; [ fpletz vcunat ];
|
2022-11-04 12:27:35 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|