fix(flake.nix): build go-migrate with only postgres driver (#26643)

Follow-up to #26584.

After the nixpkgs 25.05 update, the default go-migrate package panics at
startup due to its Snowflake driver before Postgres commands can run.
Coder only uses the migrate CLI for migration creation and local Postgres
migrations, so override the build tags to include only the Postgres driver.
This commit is contained in:
George K
2026-06-24 01:11:54 -07:00
committed by GitHub
parent 0807b3272c
commit ff71c1e824
+9 -1
View File
@@ -246,6 +246,14 @@
xcbuild
]);
migrate = pkgs.go-migrate.overrideAttrs (_oldAttrs: {
# Coder only needs migrate for migration creation and local Postgres
# migrations. The nixpkgs default build includes every database
# driver and is broken by a bad Go and driver combination, so rebuild
# only with the driver we need.
tags = [ "postgres" ];
});
# The minimal set of packages to build Coder.
devShellPackages =
with pkgs;
@@ -277,7 +285,7 @@
gnutar
unstablePkgs.go_1_26
gofumpt
go-migrate
migrate
(pinnedPkgs.golangci-lint)
gopls
gotestsum