From d5fd4f001b4aaae09c98fd260ae0256e6aa09b1a Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 22 Oct 2025 11:14:52 +0200 Subject: [PATCH] grafana: fix `find(1)` brackets in `go.mod` fixup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DAMN you `find`! The parentheses are only necessary when having `-exec` 🫠 It does what I expected, i.e. finding EVERY go.mod and go.work instead of only go.work when not using `-exec`. --- pkgs/servers/monitoring/grafana/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index 524ba2fa4c0e..6d5d8a69bd5a 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -64,7 +64,7 @@ buildGoModule (finalAttrs: { # This is still better than maintaining some list of go.mod files (or exclusions of that) # where to patch the go version (and where to not do that). postPatch = '' - find . -name go.mod -or -name "go.work" -type f -exec sed -i -e 's/^go .*/go ${finalAttrs.passthru.go.version}/g' {} \; + find . \( -name go.mod -or -name "go.work" \) -type f -exec sed -i -e 's/^go .*/go ${finalAttrs.passthru.go.version}/g' {} \; ''; proxyVendor = true;