Skip to content

fix!: Bump nixpkgs, vendor mkTerraform, drop x86_64-darwin - #198

Open
CristhianMotoche wants to merge 3 commits into
mainfrom
fix/bump-nixpkgs-go-1.26.10
Open

CristhianMotoche wants to merge 3 commits into
mainfrom
fix/bump-nixpkgs-go-1.26.10

Conversation

@CristhianMotoche

@CristhianMotoche CristhianMotoche commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The scheduled Update workflow failed (run) while building Terraform 1.17.1:

go: go.mod requires go >= 1.26.10 (running go 1.26.3; GOTOOLCHAIN=local)

The pinned nixpkgs (3e41b24, 2026-06-16) ships Go 1.26.3.

Fix

  • Bump the nixpkgs input to 9d3b8db (2026-11-03), which ships Go 1.26.10.
  • Upstream removed mkTerraform on 2026-08-29 (NixOS/nixpkgs@88b583f9e2), and Go 1.26.10 only landed on 2026-10-20, so no single revision has both. This PR copies mkTerraform (taken from the commit just before it was removed) into lib/terraform.nix, unchanged apart from dropping terraform_1 and the plugin test. Versions >= 1.9.0 use this copy. Older versions keep using mkTerraform from their older pinned nixpkgs releases.
  • Drop x86_64-darwin: nixpkgs 26.11 dropped support for it, so packages can no longer be evaluated for that system. The flake now lists aarch64-darwin, aarch64-linux and x86_64-linux explicitly (replacing the systems input), the x86_64-darwin CI job is removed, and the README is updated.
  • Use fully qualified provider names: nixpkgs 26.11 removed the short terraform-providers aliases (null, random, aws, ...). The nixpkgs-terraform-providers-bin template now uses p.hashicorp_null / p.hashicorp_random. Users calling withPlugins with short names on Terraform >= 1.9 must switch to the <owner>_<name> form.
  • Add fail-fast: false to the template matrix so one failing template doesn't cancel the others.

Breaking changes

  • x86_64-darwin packages are no longer provided.
  • withPlugins no longer accepts short provider names (e.g. p.aws → p.hashicorp_aws).

Verification

  • nixpkgs-fmt --check lib/ passes.
  • All 286 packages evaluate (forced drvPath) on aarch64-darwin, aarch64-linux and x86_64-linux.
  • The default, terranix and nixpkgs-terraform-providers-bin template dev shells evaluate against this branch.
  • Terraform >= 1.9.0 now builds with Go 1.26.10.
  • No Terraform version was built locally; relying on CI for the builds.

Once merged, the next scheduled update should be able to add 1.17.1.

🤖 Generated with Claude Code

Terraform 1.17.1 requires Go >= 1.26.10, but the pinned nixpkgs ships Go
1.26.3, which broke the scheduled update workflow. Newer nixpkgs has the
required Go version but removed `mkTerraform` (NixOS/nixpkgs@88b583f9e2),
so vendor it into lib/terraform.nix for versions built with
nixpkgs-unstable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CristhianMotoche CristhianMotoche changed the title fix: Bump nixpkgs and vendor mkTerraform fix: Bump nixpkgs, vendor mkTerraform, drop x86_64-darwin Nov 4, 2026
nixpkgs 26.11 dropped support for x86_64-darwin, so the bumped nixpkgs
input can no longer evaluate packages for that system.

BREAKING CHANGE: x86_64-darwin packages are no longer provided.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CristhianMotoche
CristhianMotoche force-pushed the fix/bump-nixpkgs-go-1.26.10 branch from 7d398aa to 932419c Compare November 4, 2026 20:51
@CristhianMotoche CristhianMotoche changed the title fix: Bump nixpkgs, vendor mkTerraform, drop x86_64-darwin fix!: Bump nixpkgs, vendor mkTerraform, drop x86_64-darwin Nov 4, 2026
nixpkgs 26.11 removed the short terraform-providers aliases (e.g. `null`,
`random`, `aws`), so `withPlugins` must use the `<owner>_<name>` form.
Also stop canceling the remaining template jobs when one fails.

BREAKING CHANGE: `withPlugins` on Terraform >= 1.9 no longer accepts short
provider names such as `p.aws`; use `p.hashicorp_aws` instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@sadjow sadjow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: Approving; all comments are non-blocking

The vendored mkTerraform matches upstream apart from the removals described, versions below 1.9 produce the same derivations as on main, and all CI jobs pass.

note (non-blocking): Keep the commit messages in the squash body

.releaserc.yml uses semantic-release's default Angular preset, which doesn't parse fix!: headers, so the major release depends on the BREAKING CHANGE: footers in the commits. If the squash body is replaced with only the title or the PR description, no release gets cut.

Comment thread lib/default.nix
};

# nixpkgs-unstable no longer provides mkTerraform, so use a vendored copy
mkTerraform =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (non-blocking): Did you consider pinning nixos-26.05 for >= 1.9?

Like the existing 23.05 and 24.05 pins: at its current head it ships Go 1.26.10, still has mkTerraform, keeps the short provider names, and still evaluates for x86_64-darwin, so this could have landed as a plain fix: without vendoring. The catch is that 26.05 leaves support at the end of December, so we'd be back here in about two months. I'm fine with going straight to unstable; I just want to make sure it was a deliberate choice.

Comment thread lib/terraform.nix
Comment on lines +1 to +3
# Vendored from nixpkgs (pkgs/applications/networking/cluster/terraform/default.nix)
# at d276d665e1c8414e4908c130d648f9bb122e3776, before `mkTerraform` was removed
# upstream in NixOS/nixpkgs@88b583f9e2.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (non-blocking): Keep the nixpkgs MIT notice on the vendored file

Since this file is copied from nixpkgs, its license notice should travel with it. Both projects are MIT, so it's only about carrying the notice.

Suggested change
# Vendored from nixpkgs (pkgs/applications/networking/cluster/terraform/default.nix)
# at d276d665e1c8414e4908c130d648f9bb122e3776, before `mkTerraform` was removed
# upstream in NixOS/nixpkgs@88b583f9e2.
# Vendored from nixpkgs (pkgs/applications/networking/cluster/terraform/default.nix)
# at d276d665e1c8414e4908c130d648f9bb122e3776, before `mkTerraform` was removed
# upstream in NixOS/nixpkgs@88b583f9e2.
# Copyright (c) 2003-2026 Eelco Dolstra and the Nixpkgs/NixOS contributors, MIT License.

Comment thread README.md
Comment on lines +85 to +86
> [!WARNING]
> `x86_64-darwin` is no longer supported because nixpkgs 26.11 dropped it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (non-blocking): Move the breaking changes where users will see them

This warning sits under the binary cache section, but x86_64-darwin packages are gone entirely, not just uncached. Could we move it next to the allowUnfree note at the top, point Intel Mac users to v5.24.0 (the last release that provides it), and add a line that withPlugins on Terraform >= 1.9 now needs fully qualified names such as p.hashicorp_aws?

Comment thread lib/terraform.nix
@@ -0,0 +1,195 @@
# Vendored from nixpkgs (pkgs/applications/networking/cluster/terraform/default.nix)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The source note makes the vendored copy easy to verify

I diffed this against nixpkgs at d276d665, and the only differences are the removed terraform_1, plugin test and plugins binding, plus their now-unused inputs.

Comment thread flake.nix
}@inputs:
let
forAllSystems = nixpkgs.lib.genAttrs (import systems);
# INFO: x86_64-darwin is not supported since nixpkgs 26.11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CristhianMotoche I strongly suggest releasing this as a major change. If I recall correctly, the release process is automated on this project via semantic-release; therefore, adding the words BREAKING CHANGE: to the commit message should bump the major version.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. The last two commits already have BREAKING CHANGE: footers, so this releases as a major as long as they stay in the squash commit message when merging.

Comment thread flake.nix
nixpkgs-24_05.url = "github:nixos/nixpkgs/nixos-24.05-small";
# INFO: Channel used for building versions from 1.9 onwards
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";

@sestrella sestrella Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CristhianMotoche I would recommend leaving this input or changing it to one that drops x86_64-darwin support. That way, consumers could customize the systems from their flakes:

inputs = {
  systems.url = "github:nix-systems/default-darwin";
  nixpkgs-terraform = {
    url = "github:stackbuilders/nixpkgs-terraform";
    inputs.systems.follows = "systems";
  };
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. nix-systems/default already dropped x86_64-darwin; our lock is just pinned to 2023. Keeping the input and running nix flake update systems gives the same three systems without breaking overrides. Note that default-darwin still includes x86_64-darwin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants