I can’t install packages like shellcheck on my mac laptop (Apple Silicon) due to ghe-8.10.4 not available. The exact error message looks like this:
$ nix-env -iA nixpkgs.shellcheck
installing 'shellcheck-0.7.2'
error: Package ‘ghc-8.10.4’ in /nix/store/z517n8mkks55pqyq3jc4h6x2q14k44y3-nixpkgs-21.11pre310022.14b0f20fa1f/nixpkgs/pkgs/development/compilers/ghc/8.10.4.nix:308 is not supported on ‘aarch64-darwin’, refusing to evaluate.
a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
for a single invocation of the nix tools.
$ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
b) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.
c) 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)
Has the channel been updated? How do I check that? I still can’t install ghc. Here’s the error:
> nix-env -iA nixpkgs.shellcheck
installing 'shellcheck-0.7.2'
error: Package ‘ghc-8.10.6’ in /nix/store/sf3lb1jxaj8gid7lyavcdn1jyp6r0bph-nixpkgs-21.11pre312229.08ef0f28e3a/nixpkgs/pkgs/development/compilers/ghc/8.10.6.nix:308 is not supported on ‘aarch64-darwin’, refusing to evaluate.
a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
for a single invocation of the nix tools.
$ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
b) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.
c) 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)