summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2022-05-25 22:45:19 +0100
committerRobert Scott <code@humanleg.org.uk>2022-05-25 22:45:19 +0100
commite9c36e2d767018dab98db4a864edb9f9d220fbef (patch)
tree772a068f97832d99625895f745495d68e28b80d3
parentc60a2b5927358cf28c0f7f8b8dbf876c838f190f (diff)
coredns: fix tests on darwin
-rw-r--r--pkgs/servers/dns/coredns/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/servers/dns/coredns/default.nix b/pkgs/servers/dns/coredns/default.nix
index 7b45f4a85b6d..c93d1235ea82 100644
--- a/pkgs/servers/dns/coredns/default.nix
+++ b/pkgs/servers/dns/coredns/default.nix
@@ -1,4 +1,8 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib
+, stdenv
+, buildGoModule
+, fetchFromGitHub
+}:
buildGoModule rec {
pname = "coredns";
@@ -20,6 +24,9 @@ buildGoModule rec {
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; {