flake.nix: use tailscale go fork (#17486)

Move our nix flake to use Tailscale's go toolchain instead
of upstream go.

Fixes #17494

Signed-off-by: Mike O'Driscoll <mikeo@tailscale.com>
This commit is contained in:
Mike O'Driscoll 2025-10-08 10:01:25 -04:00 committed by GitHub
parent ad6cf2f8f3
commit f25e47cdeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,8 +46,9 @@
systems, systems,
flake-compat, flake-compat,
}: let }: let
go125Version = "1.25.1"; goVersion = "1.25.1";
goHash = "sha256-0BDBCc7pTYDv5oHqtGvepJGskGv0ZYPDLp8NuwvRpZQ="; toolChainRev = nixpkgs.lib.fileContents ./go.toolchain.rev;
gitHash = "sha256-1OCmJ7sZL6G/6wO2+lnW4uYPCIdbXhscD5qSTIPoxDk=";
eachSystem = f: eachSystem = f:
nixpkgs.lib.genAttrs (import systems) (system: nixpkgs.lib.genAttrs (import systems) (system:
f (import nixpkgs { f (import nixpkgs {
@ -55,10 +56,12 @@
overlays = [ overlays = [
(final: prev: { (final: prev: {
go_1_25 = prev.go_1_25.overrideAttrs { go_1_25 = prev.go_1_25.overrideAttrs {
version = go125Version; version = goVersion;
src = prev.fetchurl { src = prev.fetchFromGitHub {
url = "https://go.dev/dl/go${go125Version}.src.tar.gz"; owner = "tailscale";
hash = goHash; repo = "go";
rev = toolChainRev;
hash = gitHash;
}; };
}; };
}) })