38 lines
1,011 B
Nix
38 lines
1,011 B
Nix
{ lib
|
|
, stdenv
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "coredns";
|
|
version = "1.9.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "coredns";
|
|
repo = "coredns";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-9lRZjY85SD1HXAWVCp8fpzV0d1Y+LbodT3Sp21CNp+k=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-gNa+dm7n71IiSCztTO5VZ5FnGTGYfNXo/HMichNzek0=";
|
|
|
|
postPatch = ''
|
|
substituteInPlace test/file_cname_proxy_test.go \
|
|
--replace "TestZoneExternalCNAMELookupWithProxy" \
|
|
"SkipZoneExternalCNAMELookupWithProxy"
|
|
|
|
substituteInPlace test/readme_test.go \
|
|
--replace "TestReadme" "SkipReadme"
|
|
'' + lib.optionalString stdenv.isDarwin ''
|
|
# loopback interface is lo0 on macos
|
|
sed -E -i 's/\blo\b/lo0/' plugin/bind/setup_test.go
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://coredns.io";
|
|
description = "A DNS server that runs middleware";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ rushmorem rtreffer deltaevo superherointj ];
|
|
};
|
|
}
|