mirror of
https://github.com/coder/coder.git
synced 2026-09-01 14:53:15 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user