Describe the bug
terragrunt 0.23.40 is not installable on Darwin (MacOS Catalina).
To Reproduce
Steps to reproduce the behavior:
nix-env -iA nixpkgs.terragrunt --show-traceExpected behavior
To install the package as expected
Current behavior
error: while evaluating the attribute 'postInstall' of the derivation 'terragrunt-0.23.40' at /nix/store/8d4ar6f3f37jdhvdz7n416c5ppx909ls-nixpkgs-21.03pre243854.2a14d21224f/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:192:11:
while evaluating the attribute 'buildCommand' of the derivation 'terraform-0.12.29' at /nix/store/8d4ar6f3f37jdhvdz7n416c5ppx909ls-nixpkgs-21.03pre243854.2a14d21224f/nixpkgs/pkgs/applications/networking/cluster/terraform/default.nix:87:32:
while evaluating the attribute 'passAsFile' of the derivation 'tf-plugin-env' at /nix/store/8d4ar6f3f37jdhvdz7n416c5ppx909ls-nixpkgs-21.03pre243854.2a14d21224f/nixpkgs/pkgs/build-support/trivial-builders.nix:7:7:
while evaluating the attribute 'handled' at /nix/store/8d4ar6f3f37jdhvdz7n416c5ppx909ls-nixpkgs-21.03pre243854.2a14d21224f/nixpkgs/pkgs/stdenv/generic/check-meta.nix:256:7:
while evaluating 'handleEvalIssue' at /nix/store/8d4ar6f3f37jdhvdz7n416c5ppx909ls-nixpkgs-21.03pre243854.2a14d21224f/nixpkgs/pkgs/stdenv/generic/check-meta.nix:152:38, called from /nix/store/8d4ar6f3f37jdhvdz7n416c5ppx909ls-nixpkgs-21.03pre243854.2a14d21224f/nixpkgs/pkgs/stdenv/generic/check-meta.nix:257:14:
Package ‘terraform-provider-libvirt-0.6.2’ in /nix/store/8d4ar6f3f37jdhvdz7n416c5ppx909ls-nixpkgs-21.03pre243854.2a14d21224f/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.
Allowing UnsupportedSystem didn't fix the issue.
Notify maintainers
@marsam @r-ryantm @zowoq @c00w @06kellyjac @shlevy
Metadata
"x86_64-darwin"Darwin 19.6.0, macOS 10.15.6nononix-env (Nix) 2.3.7"nixpkgs-21.03pre243854.2a14d21224f"/Users/user/.nix-defexpr/channels/nixpkgsMaintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
- terragrunt
So it looks like terraform-provider-libvirt-0.6.2 is the issue here. It's pulled in by terraform.full on this line:
I don't like the terraform.full usage personally because I'm fine with terraform grabbing providers on the fly.
You can try put this in ~/.config/nixpkgs/overlays.nix:
[
(self: super: {
terragrunt = super.terragrunt.overrideAttrs (oldAttrs: {
postInstall = ''
wrapProgram $out/bin/terragrunt \
--set TERRAGRUNT_TFPATH ${super.stdenv.lib.getBin super.terraform}/bin/terraform
'';
});
})
]
If you did want to use the terraform providers in nixpkgs I guess you'll want to override terraform.full instead.
@06kellyjac Thank you very much!
This works for me and does not affect my daily usage.
IDK what everyone else's opinion is on whether terraform.full or terraform should be default, but we should certainly add an option to make this a bit cleaner.
Thoughts on a separate terragrunt and terragrunt.full? Or just an option like polybar etc
https://github.com/NixOS/nixpkgs/blob/c8479286c77f66d829894114c4481de75d25d8c8/pkgs/applications/misc/polybar/default.nix#L14
There is the concern of changing the behavior for existing users. IDK how nixpkgs/nixos approaches breaking changes.