coredns: fix tests on darwin

This commit is contained in:
Robert Scott 2022-05-25 22:45:19 +01:00
parent c60a2b5927
commit e9c36e2d76

View file

@ -1,4 +1,8 @@
{ lib, buildGoModule, fetchFromGitHub }: { lib
, stdenv
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec { buildGoModule rec {
pname = "coredns"; pname = "coredns";
@ -20,6 +24,9 @@ buildGoModule rec {
substituteInPlace test/readme_test.go \ substituteInPlace test/readme_test.go \
--replace "TestReadme" "SkipReadme" --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; { meta = with lib; {