-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
$ nix run nixpkgs#google-chrome
error:
… in the condition of the assert statement
at /nix/store/rqdf3gfjq8zh488msnv62h03kkzr308q-source/lib/customisation.nix:267:17:
266| in commonAttrs // {
267| drvPath = assert condition; drv.drvPath;
| ^
268| outPath = assert condition; drv.outPath;
… while evaluating the attribute 'handled'
at /nix/store/rqdf3gfjq8zh488msnv62h03kkzr308q-source/pkgs/stdenv/generic/check-meta.nix:490:7:
489| # or, alternatively, just output a warning message.
490| handled =
| ^
491| (
(stack trace truncated; use '--show-trace' to show the full trace)
error: Package ‘google-chrome-120.0.6099.224’ in /nix/store/rqdf3gfjq8zh488msnv62h03kkzr308q-source/pkgs/applications/networking/browsers/google-chrome/default.nix:161 has an unfree license (‘unfree’), refusing to evaluate.
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) [
"google-chrome-120.0.6099.224"
];
}
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.
even though I set it to allow unfree packages:
nix-config/modules/nixos/nix-conf.nix
Line 8 in d819b18
| nixpkgs.config.allowUnfree = true; |
Line 48 in d819b18
| config.allowUnfree = true; |
nix-config/modules/home-manager/nix-conf.nix
Lines 3 to 5 in d819b18
| allowUnfree = true; | |
| # Workaround for https://github.com/nix-community/home-manager/issues/2942 | |
| allowUnfreePredicate = _: true; |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working