From 35f532c9d797a1310e87e9e606602b64527bb5e4 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 10 Dec 2025 07:43:58 +1000 Subject: [PATCH] opentofu: 1.10.8 -> 1.11.1 Diff: https://github.com/opentofu/opentofu/compare/v1.10.8...v1.11.1 Changelog: https://github.com/opentofu/opentofu/blob/v1.11.0/CHANGELOG.md https://github.com/opentofu/opentofu/blob/v1.11.1/CHANGELOG.md --- pkgs/by-name/op/opentofu/package.nix | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/op/opentofu/package.nix b/pkgs/by-name/op/opentofu/package.nix index 09e02154c2a8..963dedf12b48 100644 --- a/pkgs/by-name/op/opentofu/package.nix +++ b/pkgs/by-name/op/opentofu/package.nix @@ -4,9 +4,10 @@ buildGoModule, fetchFromGitHub, makeWrapper, - coreutils, runCommand, runtimeShell, + versionCheckHook, + writableTmpDirAsHomeHook, writeText, terraform-providers, installShellFiles, @@ -15,16 +16,16 @@ let package = buildGoModule rec { pname = "opentofu"; - version = "1.10.8"; + version = "1.11.1"; src = fetchFromGitHub { owner = "opentofu"; repo = "opentofu"; tag = "v${version}"; - hash = "sha256-3Sl34tPRA2BF59bouPkuS/CiYcZfRivD+PozTT+srT0="; + hash = "sha256-2mtSRszdHeHDKpIu+w/Y/P8NfoSPzPBkgQ9YgKSwrls="; }; - vendorHash = "sha256-rOSl5WE1/WcgCVpcAOXVl8cBSxjrlG7fxzpRO/5i5GA="; + vendorHash = "sha256-aPBP7mZ4NuPAYAOW20cQ6bWQUqk9mfiaeFUS/RQyW4I="; ldflags = [ "-s" "-w" @@ -32,10 +33,8 @@ let "github.com/opentofu/opentofu/version.dev=no" ]; - postConfigure = '' - # speakeasy hardcodes /bin/stty https://github.com/bgentry/speakeasy/issues/22 - substituteInPlace vendor/github.com/bgentry/speakeasy/speakeasy_unix.go \ - --replace-fail "/bin/stty" "${coreutils}/bin/stty" + postPatch = '' + substituteInPlace go.mod --replace-fail 'go 1.25.5' 'go 1.25.4' ''; nativeBuildInputs = [ installShellFiles ]; @@ -53,8 +52,17 @@ let installShellCompletion --bash --name tofu <(echo complete -C tofu tofu) ''; + __darwinAllowLocalNetworking = true; + + nativeCheckInputs = [ + writableTmpDirAsHomeHook + versionCheckHook + ]; + + doInstallCheck = true; + versionCheckProgramArg = "version"; + preCheck = '' - export HOME=$TMPDIR export TF_SKIP_REMOTE_TESTS=1 '';