summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2022-05-26 00:20:24 +0100
committerGitHub <noreply@github.com>2022-05-26 00:20:24 +0100
commit4f6e9865dd33d5635024a1164e17da5aa3af678a (patch)
treec141e6a0aa764fe6f4d2a4fcba8566e6eb98de92
parentaf02d617c737c385aad1789d0de1d9e6a4e608e7 (diff)
parente9c36e2d767018dab98db4a864edb9f9d220fbef (diff)
Merge pull request #174618 from risicle/ris-coredns-darwin-fix
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; {