I just realized the information is there, however does it actually show all of the packages or is it lazily evaluating and just tells you the first one?
> nix-shell -p rustdesk
error:
… while calling the 'derivationStrict' builtin
at «nix-internal»/derivation-internal.nix:37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|
… while evaluating derivation 'shell'
whose name attribute is located at /nix/store/6p1fv0wbwxyc0zhikcim3p7yybf356cz-nixos-26.05/nixos/pkgs/stdenv/generic/make-derivation.nix:647:11
… while evaluating attribute 'buildInputs' of derivation 'shell'
at /nix/store/6p1fv0wbwxyc0zhikcim3p7yybf356cz-nixos-26.05/nixos/pkgs/stdenv/generic/make-derivation.nix:718:11:
717| depsHostHost = hostHostOutputs;
718| buildInputs = hostTargetOutputs;
| ^
719| depsTargetTarget = targetTargetOutputs;
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: Refusing to evaluate package 'libsciter-4.4.8.23-bis' in /nix/store/6p1fv0wbwxyc0zhikcim3p7yybf356cz-nixos-26.05/nixos/pkgs/by-name/li/libsciter/package.nix:61 because it has an unfree license (‘unfree’)
a) To temporarily allow unfree packages, you can use an environment variable
for a single invocation of the nix tools.
$ export NIXPKGS_ALLOW_UNFREE=1
Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
then pass `--impure` in order to allow use of environment variables.
b) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.
Alternatively you can configure a predicate to allow specific packages:
{ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"libsciter"
];
}
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.
Also, I know I could set the environment variable (and I did, I already have config.allowUnfree set as well)
That’s because the check is implemented by making the evaluation fail if the license isn’t permitted. This prevents downloading unfree software.
You can evaluate the tree and get all licenses from .meta attributes recursively, but there isn’t a built-in command for this. Easiest way to accomplish that is playing around in nix repl.