From 1fa17f4fa34ff00147ac23dd0679b456646987c1 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Thu, 11 Sep 2025 00:48:03 +0800 Subject: [PATCH] buildGoModule: reference allowGoReference from finalAttrs --- pkgs/build-support/go/module.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/go/module.nix b/pkgs/build-support/go/module.nix index 00ba03533e34..b1e1a23eea71 100644 --- a/pkgs/build-support/go/module.nix +++ b/pkgs/build-support/go/module.nix @@ -250,7 +250,7 @@ lib.extendMkDerivation { ++ lib.warnIf (builtins.elem "-trimpath" GOFLAGS) "`-trimpath` is added by default to GOFLAGS by buildGoModule when allowGoReference isn't set to true" - (lib.optional (!allowGoReference) "-trimpath"); + (lib.optional (!finalAttrs.allowGoReference) "-trimpath"); inherit enableParallelBuilding; @@ -410,7 +410,8 @@ lib.extendMkDerivation { strictDeps = true; - disallowedReferences = lib.optional (!allowGoReference) go; + inherit allowGoReference; + disallowedReferences = lib.optional (!finalAttrs.allowGoReference) go; passthru = { inherit go;