Skip to content

Commit 59a707a

Browse files
committed
chore(devenv): provide go 1.27.0 and golangci-lint 2.13.0 in dev shell
nixos-unstable still ships go 1.27rc3 and golangci-lint 2.12.2, so: - switch nixpkgs-unstable input to nixos-unstable-small (has go 1.27.0) - pin languages.go to go_1_27 - build golangci-lint 2.13.0 from source with buildGo127Module - skip go-tools (staticcheck) tests, which panic when rebuilt with go 1.27 All three workarounds are commented for later removal.
1 parent 8d6e0e5 commit 59a707a

4 files changed

Lines changed: 39 additions & 16 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"vitest.explorer",
1414
"vue.volar"
1515
]
16+
},
17+
"zed": {
18+
"extensions": []
1619
}
1720
},
1821
"forwardPorts": [

devenv.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"devenv": {
44
"locked": {
55
"dir": "src/modules",
6-
"lastModified": 1783049965,
7-
"narHash": "sha256-z2QvrvE+gzLnpqfLpQA4aq2gAB4xn6C5q2o1l7GBMXU=",
6+
"lastModified": 1787159631,
7+
"narHash": "sha256-pK/PYbBHT9bt7zvQ2kB83pkMibZfQadlZha7U25qtRs=",
88
"owner": "cachix",
99
"repo": "devenv",
10-
"rev": "afed7bf3240c70d2827569568d2c46c25a64db51",
10+
"rev": "267cf2eb26840c5ec73bce0a82046ec8907ece11",
1111
"type": "github"
1212
},
1313
"original": {
@@ -22,11 +22,11 @@
2222
"nixpkgs-src": "nixpkgs-src"
2323
},
2424
"locked": {
25-
"lastModified": 1782924808,
26-
"narHash": "sha256-tn2ahNv3ZNXyVHdPx/uw+N0xa7YSMtXUr6OEvu+s8ng=",
25+
"lastModified": 1787002832,
26+
"narHash": "sha256-DGkHh88/7YLVGZ7HzSVN4YmUmR+wGKudIp6H9UsUNT0=",
2727
"owner": "cachix",
2828
"repo": "devenv-nixpkgs",
29-
"rev": "e2c881cb8d5f1cac6cef9d71f0d450a55691b999",
29+
"rev": "ee3d58d53cfcddfc0ae6fc7f04f4fe2a0c7cf0ed",
3030
"type": "github"
3131
},
3232
"original": {
@@ -39,11 +39,11 @@
3939
"nixpkgs-src": {
4040
"flake": false,
4141
"locked": {
42-
"lastModified": 1782636521,
43-
"narHash": "sha256-OG8laCOGtkxlB1JH3XqOnXxnkGJme4mQdXo5hkhCQIY=",
42+
"lastModified": 1786858016,
43+
"narHash": "sha256-Vczr2zxD0orq6N2QQe5uqOGF7TRDcQJRRuAcsdHr4kg=",
4444
"owner": "NixOS",
4545
"repo": "nixpkgs",
46-
"rev": "e1c1b84752fb0897897380a3cae9dc7fcab91ca3",
46+
"rev": "54ba4bcec4043e72a4006d825e0d7aff5562008f",
4747
"type": "github"
4848
},
4949
"original": {
@@ -55,16 +55,16 @@
5555
},
5656
"nixpkgs-unstable": {
5757
"locked": {
58-
"lastModified": 1784356753,
59-
"narHash": "sha256-12KrbMiWLcf8m7pCvAtZh1ZrgF85ZXDXvfR/fWTKy84=",
58+
"lastModified": 1787201333,
59+
"narHash": "sha256-YElrViL7Km6jOPcoPJK/OqXnF95nD8Ibc/qAUlcVM3Q=",
6060
"owner": "NixOS",
6161
"repo": "nixpkgs",
62-
"rev": "61b7c44c4073f0b827768aff0049561b5110ea5a",
62+
"rev": "ca3853d32223b08a75a5d45a54953d2f93d15de4",
6363
"type": "github"
6464
},
6565
"original": {
6666
"owner": "NixOS",
67-
"ref": "nixos-unstable",
67+
"ref": "nixos-unstable-small",
6868
"repo": "nixpkgs",
6969
"type": "github"
7070
}

devenv.nix

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,27 @@
22

33
let
44
pkgs-unstable = import inputs.nixpkgs-unstable { system = pkgs.stdenv.system; };
5+
# nixpkgs still ships golangci-lint 2.12.2 built with go 1.26, which refuses
6+
# a go.mod targeting 1.27; drop when nixpkgs bumps to >= 2.13.0 on go 1.27
7+
golangci-lint-go127 =
8+
(pkgs-unstable.golangci-lint.override {
9+
buildGo126Module = pkgs-unstable.buildGo127Module;
10+
}).overrideAttrs (finalAttrs: prev: {
11+
version = "2.13.0";
12+
src = pkgs-unstable.fetchFromGitHub {
13+
owner = "golangci";
14+
repo = "golangci-lint";
15+
tag = "v${finalAttrs.version}";
16+
hash = "sha256-WWKvf1uQr8QK0Ja+EjN0YbLMX27N23HvyfFFKfjQ1gg=";
17+
};
18+
vendorHash = "sha256-thmkiCuE4FnVTIExfwN7xm6xioxz4C+tagvIsre/s5A=";
19+
});
520
in {
21+
# staticcheck 2026.1 tests panic when rebuilt with go 1.27; drop when nixpkgs ships a fixed release
22+
overlays = [
23+
(final: prev: { go-tools = prev.go-tools.overrideAttrs (_: { doCheck = false; }); })
24+
];
25+
626
scripts.patch-sass-embedded.exec = ''
727
find node_modules/.pnpm/sass-embedded-linux-*/node_modules/sass-embedded-linux-*/dart-sass/src -name dart -print0 | xargs -I {} -0 patchelf --set-interpreter "$(<$NIX_CC/nix-support/dynamic-linker)" {}
828
'';
@@ -14,7 +34,7 @@ in {
1434
crowdin-cli
1535
nfpm
1636
# API tools
17-
golangci-lint mage
37+
golangci-lint-go127 mage
1838
# Desktop
1939
electron
2040
# Font processing tools
@@ -38,7 +58,7 @@ in {
3858

3959
go = {
4060
enable = true;
41-
package = pkgs-unstable.go;
61+
package = pkgs-unstable.go_1_27;
4262
enableHardeningWorkaround = true;
4363
};
4464
};

devenv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ inputs:
33
nixpkgs:
44
url: github:cachix/devenv-nixpkgs/rolling
55
nixpkgs-unstable:
6-
url: github:NixOS/nixpkgs/nixos-unstable
6+
url: github:NixOS/nixpkgs/nixos-unstable-small
77

88
# If you're using non-OSS software, you can set allowUnfree to true.
99
allowUnfree: true

0 commit comments

Comments
 (0)