Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terragrunt: removing terraform dependency to fix the build on Darwin #106572

Conversation

kalbasit
Copy link
Member

@kalbasit kalbasit commented Dec 10, 2020

Motivation for this change

Terragrunt is currently borken on Darwin because it tries to pull terraform.full which includes the libvirt plugin that does not support Darwin.

$ nix-build -A terragrunt
error: Package ‘terraform-provider-libvirt-0.6.2’ in /Users/yl/code/opensource/base/src/github.com/NixOS/nixpkgs/pkgs/applications/networking/cluster/terraform-providers/libvirt/default.nix:47 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

(use '--show-trace' to show detailed location information)

This pull request backports #103670 to the 20.09 release, which does fix the issue because it no longer pulls terraform.full.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

cc @sevenfourk @zimbatm

Since terragrunt would trigger downloading all the plugins and basing on terraform 0.12 branch whereas people could use it against 0.11 or 0.13 terraform.

(cherry picked from commit 45ed0b7)
@kalbasit kalbasit changed the title terragrunt: removing terraform dependency (#103670) terragrunt: removing terraform dependency Dec 10, 2020
@ofborg ofborg bot requested a review from peterhoeg December 10, 2020 17:03
@kalbasit kalbasit changed the title terragrunt: removing terraform dependency terragrunt: removing terraform dependency to fix the build on Darwin Dec 10, 2020
@ivankovnatsky
Copy link
Contributor

nixpkgs-review pr 106572

1 package built:
terragrunt

[nix-shell:~/.cache/nixpkgs-review/pr-106572]$ terragrunt -v
terragrunt version v0.23.40

[nix-shell:~/.cache/nixpkgs-review/pr-106572]$

@zimbatm zimbatm merged commit a5705f7 into NixOS:release-20.09 Dec 10, 2020
@kalbasit kalbasit deleted the opensource/nixpkgs_fix_terraform_on_darwin branch December 11, 2020 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants