Commit Graph

36 Commits

Author SHA1 Message Date
Tom Herbers
65a751fbda go_1_25: 1.25.12 -> 1.25.13
Changelog: https://go.dev/doc/devel/release#go1.25.minor
2026-08-14 00:19:17 +02:00
Tom Herbers
3492eab8d4 go_1_25: 1.25.11 -> 1.25.12
Changelog: https://go.dev/doc/devel/release#go1.25.minor
2026-07-07 22:34:59 +02:00
Tom Herbers
242fe12299 go_1_25: 1.25.10 -> 1.25.11
Changelog: https://go.dev/doc/devel/release#go1.25.minor
2026-06-03 09:23:58 +02:00
Tom Herbers
f71a37203b go_1_25: 1.25.9 -> 1.25.10
Changelog: https://go.dev/doc/devel/release#go1.25.minor
2026-05-07 19:02:35 +02:00
Tom Herbers
f8d24454ca go_1_25: 1.25.8 -> 1.25.9
Changelog: https://go.dev/doc/devel/release#go1.25.minor
2026-04-10 00:24:40 +02:00
Tom Herbers
f043b3a754 go_1_25: 1.25.7 -> 1.25.8
Changelog: https://go.dev/doc/devel/release#go1.25.minor
2026-03-06 11:05:40 +01:00
Leon Klingele
466bc97ad9 go_1_25: 1.25.6 -> 1.25.7 2026-02-04 17:29:17 +01:00
Tom Herbers
841730db5c go_1_25: 1.25.5 -> 1.25.6
Changelog: https://go.dev/doc/devel/release#go1.25.minor
2026-01-15 21:09:07 +01:00
zowoq
316d7bfa21 go: enable structuredAttrs (#470403) 2025-12-17 21:52:01 +00:00
Stefan Frijters
161fd0c2dc go: enable structuredAttrs 2025-12-13 12:05:53 +01:00
Wolfgang Walther
46c0c0eae7 Merge branch 'staging-next' into staging 2025-12-10 18:42:31 +01:00
Ihar Hrachyshka
567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
Leon Klingele
1160854ac7 go_1_25: 1.25.4 -> 1.25.5 2025-12-02 18:01:23 +01:00
Luna Nova
ce37d84094 go: revert default PIE changes
Reverts default PIE patch for go.
Does not reintroduce usages of removed "pie" hardening flag.

I've made a right mess 😿; we have to back go default PIE out late.

building with -race was just reported broken, there isn't time to investigate.
fixing is a mass rebuild.

People are using nixpkgs' go outside of nix derivations to produce
executables to copy into containers. buildGoModule currently sets
buildmode=exe when CGO_ENABLED=0 but this does nothing to maintain the
existing interface for external users.

We are fortunate that backing out the go PIE change in this manner
does not reintroduce breakage of pkgsMusl.rclone etc
that previously occurred when buildmode=pie *wasn't* set.
The gcc `--enable-default-pie` approach turns out to not cause problems
when mixed with a non-PIE go externally linked build. Historical issues
were due to our linker wrapper being less smart about enabling PIE.

Default PIE for go should be revisited post branch off.

Fixes: #456953
Fixes: #461539
2025-11-14 07:32:04 -08:00
Paul Meyer
1edaf6d179 go: only apply PIE by default when CGO is enabled (#458867) 2025-11-08 12:25:02 +00:00
Leon Klingele
5cb4fe3fef go_1_25: 1.25.3 -> 1.25.4 2025-11-06 05:24:59 +01:00
Luna Nova
e73b7bfc68 go: move tests to separate file for sharing between versions 2025-11-05 07:16:12 -08:00
Leon Klingele
b80587454a go_1_25: 1.25.2 -> 1.25.3 2025-10-13 23:29:44 +02:00
Randy Eckenrode
7da765f439 go: use default SDK on Darwin (14.4) 2025-10-09 18:23:29 -04:00
Luna Nova
7b3a342260 go: restrict default pie patch to known good GOARCH
Blanket application of the patch was insufficiently pessimistic.
The original plan from discussion in matrix
was that BuildModeSupported("gc", "pie", goos, goarch)
should let us know if default pie would work, however
it seems that in some cases BuildModeSupported can return
true but pie will fail anyway.

Let's make an allowlist of GOARCH values so we aren't
breaking any value that has not been tested.

Co-authored-by: Philip Taron <philip.taron@gmail.com>
2025-10-09 08:52:47 -07:00
Paul Meyer
db84ed7e8b go_1_25: 1.25.1 -> 1.25.2 (#449724) 2025-10-08 08:49:48 +02:00
Luna Nova
dbb57d8d86 go: only enable PIE by default when building for GOARCH matching target
We rely on teaching go to use the correct ELF interpreter
for PIE in a way that can't work for packages that 
go off and do their own GOARCH=something cross builds
without touching nixpkgs cross machinery,
so update the default pie patch to bake targetPlatform's
GOARCH and only activate for it.

tailscale works as a testcase for this as it cross compiles
many arches in tstest/archtest/qemu_test.go
2025-10-07 20:27:45 -07:00
Luna Nova
08aadbf8d4 go: position independent executables by default
Followup to setting --enable-default-pie for our gcc,
we teach go to build PIE by default when supported.
2025-10-07 20:27:45 -07:00
Luna Nova
97a43a6db4 go: teach internal linker to use correct ELF interpreter
Teaches go's internal linker to use the GO_LDSO env var as the path for the dynamic linker, instead of defaulting to an FHS /lib path.
GO_LDSO is automatically set to the appropriate value by checking $NIX_CC/nix-support/dynamic-linker
External linking is set as the default for cross compile situations
where CGO is supported.
Teaching go to correctly handle cross
in the internal linker is hard, and our system linker already knows
how to find the right ELF interpreter.
For cross situations where CGO is not supported we assume either non-ELF
binaries or static binaries will be produced.
2025-10-07 17:32:25 -07:00
zowoq
c27d4b0b74 go_1_25: 1.25.1 -> 1.25.2
Changelog: https://go.dev/doc/devel/release#go1.25
2025-10-08 09:53:43 +10:00
nixpkgs-ci[bot]
3cf2f09936 Merge staging-next into staging 2025-09-16 12:07:49 +00:00
OPNA2608
68fcc59457 go_1_25: Disable CGO for powerpc64-linux target 2025-09-13 16:31:07 +02:00
zowoq
3c0099c8b9 Reapply "go_1_25: 1.25.0 -> 1.25.1"
This reverts commit e84ec1a23c.
2025-09-08 16:07:30 +10:00
K900
e84ec1a23c Revert "go_1_25: 1.25.0 -> 1.25.1"
This reverts commit f68798a02e.

This is a world rebuild now, so we need to land this in the next cycle.
2025-09-08 08:43:13 +03:00
C4 Patino
f68798a02e go_1_25: 1.25.0 -> 1.25.1 2025-09-07 13:26:13 -05:00
Alvaro Aleman
eae238e32a go_1_25: 1.25rc3 -> 1.25.0 2025-08-12 19:52:39 -04:00
zowoq
b889ceecae go_1_25: 1.25rc2 -> 1.25rc3 2025-08-07 09:05:08 +10:00
Ross Smyth
d2ac4dfa61 go: isWindows -> isMinGW 2025-08-01 17:55:09 -04:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
OPNA2608
83c10203a2 go: Mark powerpc64-linux as badPlatform
Since 1.9, there is no support for POWER < 8, and no interest upstream in supporting it again.
2025-07-20 15:32:18 +02:00
zowoq
9bbcfea275 go_1_25: init at 1.25rc2 2025-07-09 19:02:32 +10:00