buildGo{Module,Package}: warn if buildFlags is used

zowoq cb7d80dc a6e2f2fc

+10
+5
pkgs/development/go-modules/generic/default.nix
··· 46 # Not needed with buildGoModule 47 , goPackagePath ? "" 48 49 , ... }@args': 50 51 with builtins; ··· 268 }; 269 }); 270 in 271 package
··· 46 # Not needed with buildGoModule 47 , goPackagePath ? "" 48 49 + # needed for buildFlags warning 50 + , buildFlags ? "" 51 + 52 , ... }@args': 53 54 with builtins; ··· 271 }; 272 }); 273 in 274 + lib.warnIf (buildFlags != "") 275 + "Use the `ldflags` and/or `tags` attributes instead of `buildFlags`" 276 package
+5
pkgs/development/go-packages/generic/default.nix
··· 43 44 , CGO_ENABLED ? go.CGO_ENABLED 45 46 , meta ? {}, ... } @ args: 47 48 ··· 257 } // meta; 258 }); 259 in 260 package
··· 43 44 , CGO_ENABLED ? go.CGO_ENABLED 45 46 + # needed for buildFlags warning 47 + , buildFlags ? "" 48 + 49 , meta ? {}, ... } @ args: 50 51 ··· 260 } // meta; 261 }); 262 in 263 + lib.warnIf (buildFlags != "") 264 + "Use the `ldflags` and/or `tags` attributes instead of `buildFlags`" 265 package