Nixpkgs: Package terraform-provider-libvirt-0.6.2 is not supported on x86_64-darwin

Created on 21 Sep 2020  Â·  3Comments  Â·  Source: NixOS/nixpkgs

Describe the bug
terragrunt 0.23.40 is not installable on Darwin (MacOS Catalina).

To Reproduce
Steps to reproduce the behavior:

  1. From Darwin, run nix-env -iA nixpkgs.terragrunt --show-trace

Expected 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

  • system: "x86_64-darwin"
  • host os: Darwin 19.6.0, macOS 10.15.6
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.3.7
  • channels(user): "nixpkgs-21.03pre243854.2a14d21224f"
  • nixpkgs: /Users/user/.nix-defexpr/channels/nixpkgs

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
- terragrunt 
bug darwin

All 3 comments

So it looks like terraform-provider-libvirt-0.6.2 is the issue here. It's pulled in by terraform.full on this line:

https://github.com/NixOS/nixpkgs/blob/d3b47f15561ce11f589fdea3ddb8e7839ef825f8/pkgs/applications/networking/cluster/terragrunt/default.nix#L26

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chris-martin picture chris-martin  Â·  3Comments

yawnt picture yawnt  Â·  3Comments

teto picture teto  Â·  3Comments

edolstra picture edolstra  Â·  3Comments

ob7 picture ob7  Â·  3Comments