From b53710e19ebc2900d295e9631ceb59bb96838d1e Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 23 Jun 2019 12:36:23 -0500 Subject: [PATCH] caddy: disable telemetry Co-authored-by: Franz Pletz --- pkgs/servers/caddy/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/caddy/default.nix b/pkgs/servers/caddy/default.nix index 56fa95391cc7..bb1f4ac85386 100644 --- a/pkgs/servers/caddy/default.nix +++ b/pkgs/servers/caddy/default.nix @@ -16,9 +16,15 @@ buildGoModule rec { }; modSha256 = "0np0mbs0mrn8scqa0dgvi7ya1707b3883prdaf1whsqrcr71ig8q"; - buildFlagsArray = '' - -ldflags= - -s -w -X github.com/caddyserver/caddy/caddy/caddymain.gitTag=v${version} + preBuild = '' + cat << EOF > caddy/main.go + package main + import "github.com/caddyserver/caddy/caddy/caddymain" + func main() { + caddymain.EnableTelemetry = false + caddymain.Run() + } + EOF ''; meta = with stdenv.lib; {