buildGoModule: remove compatibility layer for directly specified CGO_ENABLED

Changed files
+4 -16
doc
release-notes
pkgs
build-support
+3
doc/release-notes/rl-2511.section.md
···
- `python3Packages.bjoern` has been removed, as the upstream is unmaintained and it depends on a 14-year-old version of http-parser with numerous vulnerabilities.
+
- `buildGoModule` removes the compatibility layer of `CGO_ENABLED` not specified via `env`.
+
Specifying `CGO_ENABLED` directly now results in an error.
+
- `buildGoModule` now warns if `<pkg>.passthru.overrideModAttrs` is lost during the overriding of its result packages.
- `gentium` package now provides `Gentium-*.ttf` files, and not `GentiumPlus-*.ttf` files like before. The font identifiers `Gentium Plus*` are available in the `gentium-plus` package, and if you want to use the more recently updated package `gentium` [by sil](https://software.sil.org/gentium/), you should update your configuration files to use the `Gentium` font identifier.
+1 -16
pkgs/build-support/go/module.nix
···
constructDrv = stdenv.mkDerivation;
excludeDrvArgNames = [
"overrideModAttrs"
-
# Compatibility layer to the directly-specified CGO_ENABLED.
-
# TODO(@ShamrockLee): Remove after Nixpkgs 25.05 branch-off
-
"CGO_ENABLED"
];
extendDrvArgs =
finalAttrs:
···
GO111MODULE = "on";
GOTOOLCHAIN = "local";
-
CGO_ENABLED =
-
args.env.CGO_ENABLED or (
-
if args ? CGO_ENABLED then
-
# Compatibility layer to the CGO_ENABLED attribute not specified as env.CGO_ENABLED
-
# TODO(@ShamrockLee): Remove and convert to
-
# CGO_ENABLED = args.env.CGO_ENABLED or go.CGO_ENABLED
-
# after the Nixpkgs 25.05 branch-off.
-
lib.warn
-
"${finalAttrs.finalPackage.meta.position}: buildGoModule: specify CGO_ENABLED with env.CGO_ENABLED instead."
-
args.CGO_ENABLED
-
else
-
go.CGO_ENABLED
-
);
+
CGO_ENABLED = args.env.CGO_ENABLED or go.CGO_ENABLED;
};
GOFLAGS =