From 9ae900693a1b8e68b31f0aa36683a4d07ae6e488 Mon Sep 17 00:00:00 2001 From: Davis Schirmer Date: Sat, 19 Apr 2025 12:03:44 -0400 Subject: [PATCH 1/7] coredns: 1.11.3 -> 1.12.1 https://github.com/coredns/coredns/releases/tag/v1.12.1 --- pkgs/by-name/co/coredns/package.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/co/coredns/package.nix b/pkgs/by-name/co/coredns/package.nix index 109b6ac2ec76..17a15b895a29 100644 --- a/pkgs/by-name/co/coredns/package.nix +++ b/pkgs/by-name/co/coredns/package.nix @@ -6,7 +6,7 @@ installShellFiles, nixosTests, externalPlugins ? [ ], - vendorHash ? "sha256-mp+0/DQTNsgAZTnLqcQq1HVLAfKr5vUGYSZlIvM7KpE=", + vendorHash ? "sha256-i4eQ7LwkLTfFxRUlZ68qdtqrj2k+aWNQevyhU4Iv2lw=", }: let @@ -14,13 +14,13 @@ let in buildGoModule rec { pname = "coredns"; - version = "1.11.3"; + version = "1.12.1"; src = fetchFromGitHub { owner = "coredns"; repo = "coredns"; rev = "v${version}"; - sha256 = "sha256-8LZMS1rAqEZ8k1IWSRkQ2O650oqHLP0P31T8oUeE4fw="; + sha256 = "sha256-ALGQWUUvSGXbsOoLW5e62lPv3JU5WvJMeZYkEWiRhu4="; }; inherit vendorHash; @@ -95,16 +95,17 @@ buildGoModule rec { postPatch = '' substituteInPlace test/file_cname_proxy_test.go \ - --replace "TestZoneExternalCNAMELookupWithProxy" \ - "SkipZoneExternalCNAMELookupWithProxy" + --replace-fail \ + "TestZoneExternalCNAMELookupWithProxy" \ + "SkipZoneExternalCNAMELookupWithProxy" substituteInPlace test/readme_test.go \ - --replace "TestReadme" "SkipReadme" + --replace-fail "TestReadme" "SkipReadme" # this test fails if any external plugins were imported. # it's a lint rather than a test of functionality, so it's safe to disable. substituteInPlace test/presubmit_test.go \ - --replace "TestImportOrdering" "SkipImportOrdering" + --replace-fail "TestImportOrdering" "SkipImportOrdering" '' + lib.optionalString stdenv.hostPlatform.isDarwin '' # loopback interface is lo0 on macos @@ -112,7 +113,7 @@ buildGoModule rec { # test is apparently outdated but only exhibits this on darwin substituteInPlace test/corefile_test.go \ - --replace "TestCorefile1" "SkipCorefile1" + --replace-fail "TestCorefile1" "SkipCorefile1" ''; postInstall = '' From a2e0d904770db50a1626cba7b4f8445d31aca3dd Mon Sep 17 00:00:00 2001 From: Davis Schirmer Date: Sun, 20 Apr 2025 11:35:52 -0400 Subject: [PATCH 2/7] coredns: remove with lib, rec --- pkgs/by-name/co/coredns/package.nix | 35 +++++++++++++++++------------ 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/co/coredns/package.nix b/pkgs/by-name/co/coredns/package.nix index 17a15b895a29..a0bb2d9a7ef3 100644 --- a/pkgs/by-name/co/coredns/package.nix +++ b/pkgs/by-name/co/coredns/package.nix @@ -12,14 +12,14 @@ let attrsToSources = attrs: builtins.map ({ repo, version, ... }: "${repo}@${version}") attrs; in -buildGoModule rec { +buildGoModule (finalAttrs: { pname = "coredns"; version = "1.12.1"; src = fetchFromGitHub { owner = "coredns"; repo = "coredns"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; sha256 = "sha256-ALGQWUUvSGXbsOoLW5e62lPv3JU5WvJMeZYkEWiRhu4="; }; @@ -125,15 +125,22 @@ buildGoModule rec { kubernetes-multi-node = nixosTests.kubernetes.dns-multi-node; }; - meta = with lib; { - homepage = "https://coredns.io"; - description = "DNS server that runs middleware"; - mainProgram = "coredns"; - license = licenses.asl20; - maintainers = with maintainers; [ - rushmorem - rtreffer - deltaevo - ]; - }; -} + meta = + let + inherit (lib) + licenses + maintainers + ; + in + { + homepage = "https://coredns.io"; + description = "DNS server that runs middleware"; + mainProgram = "coredns"; + license = licenses.asl20; + maintainers = with maintainers; [ + rushmorem + rtreffer + deltaevo + ]; + }; +}) From 2470568958489aa5f3a7a2de2ed4307644c28861 Mon Sep 17 00:00:00 2001 From: Davis Schirmer Date: Sun, 20 Apr 2025 12:32:35 -0400 Subject: [PATCH 3/7] coredns: remove meta lib inheritance --- pkgs/by-name/co/coredns/package.nix | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/co/coredns/package.nix b/pkgs/by-name/co/coredns/package.nix index a0bb2d9a7ef3..240226ac4928 100644 --- a/pkgs/by-name/co/coredns/package.nix +++ b/pkgs/by-name/co/coredns/package.nix @@ -125,22 +125,15 @@ buildGoModule (finalAttrs: { kubernetes-multi-node = nixosTests.kubernetes.dns-multi-node; }; - meta = - let - inherit (lib) - licenses - maintainers - ; - in - { - homepage = "https://coredns.io"; - description = "DNS server that runs middleware"; - mainProgram = "coredns"; - license = licenses.asl20; - maintainers = with maintainers; [ - rushmorem - rtreffer - deltaevo - ]; - }; + meta = { + homepage = "https://coredns.io"; + description = "DNS server that runs middleware"; + mainProgram = "coredns"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ + rushmorem + rtreffer + deltaevo + ]; + }; }) From e56e3f912bce8cab4e92dd709430abd711a56641 Mon Sep 17 00:00:00 2001 From: Davis Schirmer Date: Sun, 20 Apr 2025 13:23:21 -0400 Subject: [PATCH 4/7] coredns: replace sha256 with hash --- pkgs/by-name/co/coredns/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/co/coredns/package.nix b/pkgs/by-name/co/coredns/package.nix index 240226ac4928..253889413dc0 100644 --- a/pkgs/by-name/co/coredns/package.nix +++ b/pkgs/by-name/co/coredns/package.nix @@ -20,7 +20,7 @@ buildGoModule (finalAttrs: { owner = "coredns"; repo = "coredns"; tag = "v${finalAttrs.version}"; - sha256 = "sha256-ALGQWUUvSGXbsOoLW5e62lPv3JU5WvJMeZYkEWiRhu4="; + hash = "sha256-ALGQWUUvSGXbsOoLW5e62lPv3JU5WvJMeZYkEWiRhu4="; }; inherit vendorHash; From a0dffa6bd109fca2606247722b56b890687c21e1 Mon Sep 17 00:00:00 2001 From: Davis Schirmer Date: Sun, 20 Apr 2025 13:23:44 -0400 Subject: [PATCH 5/7] coredns: add djds as maintainer --- pkgs/by-name/co/coredns/package.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/co/coredns/package.nix b/pkgs/by-name/co/coredns/package.nix index 253889413dc0..e7aa030d1970 100644 --- a/pkgs/by-name/co/coredns/package.nix +++ b/pkgs/by-name/co/coredns/package.nix @@ -131,9 +131,10 @@ buildGoModule (finalAttrs: { mainProgram = "coredns"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ - rushmorem - rtreffer deltaevo + djds + rtreffer + rushmorem ]; }; }) From 21295b6481dfc86db0378cc29b6c91a8296797e7 Mon Sep 17 00:00:00 2001 From: Davis Schirmer Date: Sun, 20 Apr 2025 13:25:14 -0400 Subject: [PATCH 6/7] coredns: allow local networking in Darwin sandbox --- pkgs/by-name/co/coredns/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/co/coredns/package.nix b/pkgs/by-name/co/coredns/package.nix index e7aa030d1970..ee9e3f95f7c1 100644 --- a/pkgs/by-name/co/coredns/package.nix +++ b/pkgs/by-name/co/coredns/package.nix @@ -116,6 +116,8 @@ buildGoModule (finalAttrs: { --replace-fail "TestCorefile1" "SkipCorefile1" ''; + __darwinAllowLocalNetworking = true; + postInstall = '' installManPage man/* ''; From 42d05aab87aec2ef53d2b9b55b859fbd4ad95c8b Mon Sep 17 00:00:00 2001 From: Davis Schirmer Date: Wed, 11 Jun 2025 20:47:06 -0400 Subject: [PATCH 7/7] coredns: 1.12.1 -> 1.12.2 https://github.com/coredns/coredns/releases/tag/v1.12.2 --- pkgs/by-name/co/coredns/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/co/coredns/package.nix b/pkgs/by-name/co/coredns/package.nix index ee9e3f95f7c1..9ec093cf4084 100644 --- a/pkgs/by-name/co/coredns/package.nix +++ b/pkgs/by-name/co/coredns/package.nix @@ -6,7 +6,7 @@ installShellFiles, nixosTests, externalPlugins ? [ ], - vendorHash ? "sha256-i4eQ7LwkLTfFxRUlZ68qdtqrj2k+aWNQevyhU4Iv2lw=", + vendorHash ? "sha256-Es3xy8NVDo7Xgu32jJa4lhYWGa5hJnRyDKFYQqB3aBY=", }: let @@ -14,13 +14,13 @@ let in buildGoModule (finalAttrs: { pname = "coredns"; - version = "1.12.1"; + version = "1.12.2"; src = fetchFromGitHub { owner = "coredns"; repo = "coredns"; tag = "v${finalAttrs.version}"; - hash = "sha256-ALGQWUUvSGXbsOoLW5e62lPv3JU5WvJMeZYkEWiRhu4="; + hash = "sha256-P4GhWrEACR1ZhNhGAoXWvNXYlpwnm2dz6Ggqv72zYog="; }; inherit vendorHash;