-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Anthony Rabbito <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,464 additions
and
121 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,183 changes: 1,183 additions & 0 deletions
1,183
nixos/personalities/server/0001-snowflake-plugins-ae2bbc2-4.29.2024.patch
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ lib | ||
, stdenv | ||
, buildGoModule | ||
, fetchFromGitHub | ||
, installShellFiles | ||
, externalPlugins ? [] | ||
, vendorHash ? "sha256-+IbkwbzWnBiGFb1OoSMHmsTFrtokxOI81ueQ29Xvmm8=" | ||
}: | ||
|
||
let | ||
attrsToPlugins = attrs: | ||
builtins.map ({name, repo, version}: "${name}:${repo}") attrs; | ||
attrsToSources = attrs: | ||
builtins.map ({name, repo, version}: "${repo}@${version}") attrs; | ||
in buildGoModule rec { | ||
pname = "coredns"; | ||
version = "1.11.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "coredns"; | ||
repo = "coredns"; | ||
rev = "v${version}"; | ||
sha256 = "sha256-XZoRN907PXNKV2iMn51H/lt8yPxhPupNfJ49Pymdm9Y="; | ||
}; | ||
|
||
inherit vendorHash; | ||
|
||
nativeBuildInputs = [ installShellFiles ]; | ||
|
||
outputs = [ "out" "man" ]; | ||
|
||
doCheck = false; | ||
|
||
# Override the go-modules fetcher derivation to fetch plugins | ||
modBuildPhase = '' | ||
echo blocklist:github.com/relekang/coredns-blocklist >> plugin.cfg | ||
echo tailscale:github.com/damomurf/coredns-tailscale >> plugin.cfg | ||
echo k8s_gateway:github.com/ori-edge/k8s_gateway >> plugin.cfg | ||
go mod tidy | ||
go mod vendor | ||
GOOS= GOARCH= go generate | ||
go mod tidy | ||
go mod vendor | ||
''; | ||
|
||
modInstallPhase = '' | ||
mv -t vendor go.mod go.sum plugin.cfg | ||
cp -r --reflink=auto vendor "$out" | ||
''; | ||
|
||
preBuild = '' | ||
chmod -R u+w vendor | ||
mv -t . vendor/go.{mod,sum} vendor/plugin.cfg | ||
GOOS= GOARCH= go generate | ||
''; | ||
|
||
postPatch = '' | ||
substituteInPlace test/file_cname_proxy_test.go \ | ||
--replace "TestZoneExternalCNAMELookupWithProxy" \ | ||
"SkipZoneExternalCNAMELookupWithProxy" | ||
substituteInPlace test/readme_test.go \ | ||
--replace "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" | ||
'' + lib.optionalString stdenv.isDarwin '' | ||
# loopback interface is lo0 on macos | ||
sed -E -i 's/\blo\b/lo0/' plugin/bind/setup_test.go | ||
''; | ||
|
||
postInstall = '' | ||
installManPage man/* | ||
''; | ||
|
||
meta = with lib; { | ||
homepage = "https://coredns.io"; | ||
description = "A DNS server that runs middleware"; | ||
mainProgram = "coredns"; | ||
license = licenses.asl20; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# Custom packages, that can be defined similarly to ones from nixpkgs | ||
# You can build them using 'nix build .#example' or (legacy) 'nix-build -A example' | ||
|
||
{ pkgs ? (import ../nixpkgs.nix) { } }: { | ||
{ pkgs, inputs ? (import ../nixpkgs.nix) { } }: { | ||
# example = pkgs.callPackage ./example { }; | ||
wayland-push-to-talk-fix = pkgs.callPackage ./wayland-push-to-talk-fix { }; | ||
vulkan-hdr-layer = pkgs.callPackage ./vulkan-hdr-layer { }; | ||
discover-overlay = pkgs.python3Packages.callPackage ./discover-overlay { }; | ||
# FIXME: Make this a overlay | ||
coredns-snowflake = pkgs.callPackage ./coredns-snowflake { }; | ||
} |