Skip to content

Commit 92c64a5

Browse files
authored
go_1_22/buildGo122Module: remove (#394017)
2 parents 5841240 + 385e1aa commit 92c64a5

File tree

25 files changed

+126
-403
lines changed

25 files changed

+126
-403
lines changed

pkgs/applications/networking/cloudflared/default.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77
gitUpdater,
88
}:
99

10+
let
11+
# https://github.com/cloudflare/cloudflared/issues/1151#issuecomment-1888819250
12+
# buildGoModule = buildGoModule.override {
13+
# go = buildPackages.go_1_22.overrideAttrs {
14+
# pname = "cloudflare-go";
15+
# version = "1.22.2-devel-cf";
16+
# src = fetchFromGitHub {
17+
# owner = "cloudflare";
18+
# repo = "go";
19+
# rev = "ec0a014545f180b0c74dfd687698657a9e86e310";
20+
# sha256 = "sha256-oQQ9Jyh8TphZSCaHqaugTL7v0aeZjyOdVACz86I2KvU=";
21+
# };
22+
# };
23+
# };
24+
in
25+
1026
buildGoModule rec {
1127
pname = "cloudflared";
1228
version = "2025.2.1";
@@ -91,5 +107,8 @@ buildGoModule rec {
91107
qjoly
92108
];
93109
mainProgram = "cloudflared";
110+
# cloudflared requires a fork of go 1.22 to build (see override above),
111+
# but go 1.22 is EOL and the toolchain has been removed from nixpkgs.
112+
broken = true;
94113
};
95114
}

pkgs/applications/networking/cluster/nomad/default.nix

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
lib,
33
buildGoModule,
4-
buildGo122Module,
54
buildGo124Module,
65
fetchFromGitHub,
76
nixosTests,
@@ -84,30 +83,6 @@ rec {
8483

8584
nomad = nomad_1_9;
8685

87-
nomad_1_7 = generic {
88-
buildGoModule = buildGo122Module;
89-
version = "1.7.7";
90-
sha256 = "sha256-4nuRheidR6rIoytrnDQdIP69f+sBLJ3Ias5DvqVaLFc=";
91-
vendorHash = "sha256-ZuaD8iDsT+/eW0QUavf485R804Jtjl76NcQWYHA8QII=";
92-
license = lib.licenses.bsl11;
93-
passthru.tests.nomad = nixosTests.nomad;
94-
preCheck = ''
95-
export PATH="$PATH:$NIX_BUILD_TOP/go/bin"
96-
'';
97-
};
98-
99-
nomad_1_8 = generic {
100-
buildGoModule = buildGo122Module;
101-
version = "1.8.4";
102-
sha256 = "sha256-BzLvALD65VqWNB9gx4BgI/mYWLNeHzp6WSXD/1Xf0Wk=";
103-
vendorHash = "sha256-0mnhZeiCLAWvwAoNBJtwss85vhYCrf/5I1AhyXTFnWk=";
104-
license = lib.licenses.bsl11;
105-
passthru.tests.nomad = nixosTests.nomad;
106-
preCheck = ''
107-
export PATH="$PATH:$NIX_BUILD_TOP/go/bin"
108-
'';
109-
};
110-
11186
nomad_1_9 = generic {
11287
buildGoModule = buildGo124Module;
11388
version = "1.9.7";

pkgs/applications/version-management/gitmux/default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ buildGoModule (finalAttrs: {
2121

2222
nativeCheckInputs = [ git ];
2323

24+
# After bump of Go toolchain to version >1.22, tests fail with:
25+
# vendor/github.com/rogpeppe/go-internal/testscript/exe_go118.go:14:27:
26+
# cannot use nopTestDeps{} (value of struct type nopTestDeps) as testing.testDeps value in argument to testing.MainStart:
27+
# nopTestDeps does not implement testing.testDeps (missing method InitRuntimeCoverage)'.
28+
doCheck = false;
29+
2430
ldflags = [ "-X main.version=${finalAttrs.version}" ];
2531

2632
passthru.tests.version = testers.testVersion {

pkgs/by-name/al/ali/package.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
lib,
3-
buildGo122Module,
3+
buildGoModule,
44
fetchFromGitHub,
5+
stdenv,
56
}:
67

7-
buildGo122Module rec {
8+
buildGoModule rec {
89
pname = "ali";
910
version = "0.7.5";
1011

@@ -25,5 +26,8 @@ buildGo122Module rec {
2526
platforms = platforms.linux ++ platforms.darwin;
2627
maintainers = with maintainers; [ farcaller ];
2728
mainProgram = "ali";
29+
# Broken on darwin for Go toolchain > 1.22, with error:
30+
# 'link: golang.org/x/net/internal/socket: invalid reference to syscall.recvmsg'
31+
broken = stdenv.hostPlatform.isDarwin;
2832
};
2933
}

pkgs/by-name/be/bettercap/package.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
lib,
33
stdenv,
4-
buildGo122Module,
4+
buildGoModule,
55
fetchFromGitHub,
66
pkg-config,
77
libpcap,
@@ -10,7 +10,7 @@
1010
libusb1,
1111
}:
1212

13-
buildGo122Module rec {
13+
buildGoModule rec {
1414
pname = "bettercap";
1515
version = "2.32.0";
1616

@@ -47,5 +47,8 @@ buildGo122Module rec {
4747
license = with licenses; [ gpl3Only ];
4848
maintainers = with maintainers; [ y0no ];
4949
mainProgram = "bettercap";
50+
# Broken on darwin for Go toolchain > 1.22, with error:
51+
# 'link: golang.org/x/net/internal/socket: invalid reference to syscall.recvmsg'
52+
broken = stdenv.hostPlatform.isDarwin;
5053
};
5154
}

pkgs/by-name/bi/bitmagnet/package.nix

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
{
22
lib,
3-
buildGo122Module, # builds, but does not start on 1.23
3+
buildGoModule,
44
fetchFromGitHub,
55
nix-update-script,
66
}:
77

8-
buildGo122Module rec {
8+
buildGoModule rec {
99
pname = "bitmagnet";
10-
version = "0.9.5";
10+
version = "0.10.0";
1111

1212
src = fetchFromGitHub {
1313
owner = "bitmagnet-io";
1414
repo = "bitmagnet";
1515
rev = "v${version}";
16-
hash = "sha256-so9GD9hyGfuqqYq61OD1WJXba22cR4msOPp1wLI5vAU=";
16+
hash = "sha256-KgpKpnOVtS3VoIqKhIzDvbdR54M014tQj2/ufhWMZDo=";
1717
};
1818

19-
vendorHash = "sha256-aauXgHPZbSiTW9utuHXzJr7GsWs/2aFiGuukA/B9BRc=";
19+
vendorHash = "sha256-Scper1eR6I4pCXus/jytSpW8a1omg7sJIPvOn3jYcLM=";
20+
21+
subPackages = [ "." ];
2022

2123
ldflags = [
2224
"-s"
23-
"-w"
2425
"-X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=v${version}"
2526
];
2627

pkgs/by-name/de/devdash/package.nix

Lines changed: 0 additions & 52 deletions
This file was deleted.

pkgs/by-name/gr/grafana-agent/package.nix

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
lib,
3-
buildGo122Module,
3+
buildGoModule,
44
fetchFromGitHub,
55
fetchYarnDeps,
66
fixup-yarn-lock,
@@ -14,9 +14,7 @@
1414
yarn,
1515
}:
1616

17-
# Breaks with Go 1.23: https://github.com/grafana/agent/issues/6972
18-
# FIXME: unpin when fixed upstream
19-
buildGo122Module rec {
17+
buildGoModule rec {
2018
pname = "grafana-agent";
2119
version = "0.44.2";
2220

@@ -130,5 +128,9 @@ buildGo122Module rec {
130128
emilylange
131129
];
132130
mainProgram = "grafana-agent";
131+
# Breaks with Go 1.23: https://github.com/grafana/agent/issues/6972
132+
# Binary panics at runtime with:
133+
# 'panic: pattern "GET /debug/pprof/" (registered at net/http/pprof/pprof.go:100) conflicts with pattern "/debug/pprof/delta_heap"'
134+
broken = true;
133135
};
134136
}

pkgs/by-name/ho/hof/package.nix

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
22
lib,
3-
buildGo122Module,
3+
buildGoModule,
44
fetchFromGitHub,
55
installShellFiles,
6+
stdenv,
67
}:
78

8-
buildGo122Module rec {
9+
buildGoModule rec {
910
pname = "hof";
10-
version = "0.6.9";
11+
version = "0.6.10";
1112

1213
src = fetchFromGitHub {
1314
owner = "hofstadter-io";
1415
repo = "hof";
1516
rev = "v${version}";
16-
hash = "sha256-okY+CkPnlndy5H4M1+T1CY21+63+KPBinHoa5+8kQ2M=";
17+
hash = "sha256-okc11mXqB/PaXd0vsRuIIL70qWSFprvsZJtE6PvCaIg=";
1718
};
1819

1920
nativeBuildInputs = [ installShellFiles ];
2021

21-
vendorHash = "sha256-SmUEVWIyV6k5Lu5zeKGqpij3zUNRZQmIgtf8/Hf7UUs=";
22+
vendorHash = "sha256-mLOWnHzKw/B+jFNuswejEnYbPxFkk95I/BWeHRTH55I=";
2223

23-
subPackages = [ "./cmd/hof/main.go" ];
24+
subPackages = [ "./cmd/hof" ];
2425

2526
postInstall = ''
26-
mv $out/bin/main $out/bin/hof
2727
local INSTALL="$out/bin/hof"
2828
installShellCompletion --cmd hof \
2929
--bash <($out/bin/hof completion bash) \
@@ -37,5 +37,8 @@ buildGo122Module rec {
3737
license = licenses.asl20;
3838
maintainers = with maintainers; [ jfvillablanca ];
3939
mainProgram = "hof";
40+
# Broken on darwin for Go toolchain > 1.22, with error:
41+
# 'panic: open /etc/protocols: operation not permitted'
42+
broken = stdenv.hostPlatform.isDarwin;
4043
};
4144
}

pkgs/by-name/ho/honeytrap/package.nix

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
lib,
3-
buildGo122Module,
3+
buildGoModule,
44
fetchFromGitHub,
5+
stdenv,
56
}:
6-
buildGo122Module {
7+
buildGoModule {
78
pname = "honeytrap";
8-
version = "unstable-2021-12-20";
9+
version = "0-unstable-2021-12-20";
910

1011
src = fetchFromGitHub {
1112
owner = "honeytrap";
@@ -26,5 +27,8 @@ buildGo122Module {
2627
homepage = "https://github.com/honeytrap/honeytrap";
2728
license = licenses.asl20;
2829
maintainers = [ ];
30+
# Broken on darwin for Go toolchain > 1.22, with error:
31+
# 'link: golang.org/x/net/internal/socket: invalid reference to syscall.recvmsg'
32+
broken = stdenv.hostPlatform.isDarwin;
2933
};
3034
}

0 commit comments

Comments
 (0)