diff --git a/doc/release-notes/rl-2511.section.md b/doc/release-notes/rl-2511.section.md index 519fd06f6f16..007d99897833 100644 --- a/doc/release-notes/rl-2511.section.md +++ b/doc/release-notes/rl-2511.section.md @@ -38,6 +38,9 @@ - `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 `.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. diff --git a/pkgs/build-support/go/module.nix b/pkgs/build-support/go/module.nix index 00ba03533e34..c9ed1cf0e36e 100644 --- a/pkgs/build-support/go/module.nix +++ b/pkgs/build-support/go/module.nix @@ -10,9 +10,6 @@ lib.extendMkDerivation { 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: @@ -226,19 +223,7 @@ lib.extendMkDerivation { 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 =